excel-2010

Can I do an async XML call in Excel 2010 VBA?

拟墨画扇 提交于 2019-12-08 10:13:41
问题 In my spreadsheet I have a reference to the MS XML v3 library. Here is my sample code Option Explicit Private objConn As XMLHTTP30 Public Sub HandleAsyncEvent() Debug.Print "Done" End Sub Public Function InitService(serviceUrl As String, Optional asyncMode As Boolean = True) Set objConn = New XMLHTTP30 objConn.Open "POST", serviceUrl, asyncMode objConn.setRequestHeader "Content-Type", "text/xml" objConn.onreadystatechange = HandleAsyncEvent End Function I encountered a runtime exception when

Filtering Issues with Macro for Creating Pivot Table in Excel 2010 VBA

这一生的挚爱 提交于 2019-12-08 09:30:54
问题 I am new to VBA and am trying to write a macro that will create a pivot table. I need to filter various fields and have tried using PivotFilters.Add and PivotItems to only let certain things through...sometimes it works, but other times it throws errors. The following code works just fine: Sub CreatePivot() Dim objTable As PivotTable, objField As PivotField ActiveWorkbook.Sheets("CP Monthly Data").Select Range("A1").Select Set objTable = Sheet1.PivotTableWizard objTable.Name = "Resource

Using Import wizard to import Excel data into table in SQL Server 2012 failing - text truncation

橙三吉。 提交于 2019-12-08 08:14:59
问题 I have an Excel file that I import weekly into a table. I am using Excel 2010 and SSMS 2012. The import failed this week and I have been unable to determine why. I was able to successfully import the data into a new table. The table definitions of the new table match the ones of my old table, so that does not seem to be the issue. Below is a screen shot of the error I receive. I have checked the PO header text field and there is nothing that exceeds the datatype of varchar(255) that I have it

Excel web query for dynamic data

99封情书 提交于 2019-12-08 08:10:17
问题 I am trying to pull mortgage rates from a bank website into Excel 2010. This is the applicable website: http://www.bmo.com/home/personal/banking/rates/mortgages I have created a web query in Excel to do this: (Data --> From Web --> "web site"). Looking through a browser, the page displays actual rates. In Excel, I only get placeholders like this: Mortgage Rates 5 year Low Rate (closed) %* Prime Rate % The problem seems to be that Excel does not recognize the dynamic content on the webpage. If

Visual Basic move all other columns to create one long column B

百般思念 提交于 2019-12-08 07:32:25
问题 I have a series of columns of data, each 15 rows deep. Column B is the column I want to move all other columns beneath in order. So the contents of column C gets cut and moved below that already in B and so on. So far I have; 'Select a column ActiveSheet.Range("B1", ActiveSheet.Range("B1").End(xlDown)).Select 'Cut Selection.Cut 'Select cell at bottom of A ActiveSheet.Range("a1").End(xlDown).Offset(1, 0).Select 'Paste ActiveSheet.Paste I need the loop to make it work, looping through all the

VBA, Excel 2010, open internet explore in new tab

﹥>﹥吖頭↗ 提交于 2019-12-08 07:10:37
问题 I have searched, tried various parameters, flags switches. No luck Here's what I'm trying to do. I have a spreadsheet that has various company names. It has VBA code that when clicked on the company name, the macro opens the financials for that company on Google finance or yahoo finance, ... but, it always open on a new window. For comparison purposes, it would be a lot more useful if all of this were on different tabs of the same window. Is there any way to change the code so that when a

Sum up similar values in VLOOKUP/INDEX-MATCH excel functions

爷,独闯天下 提交于 2019-12-08 06:52:41
问题 I have an issue with a vlookup/index-match formula in excel 2010. I have a table that contains duplicate values in the name column. I have a table in another sheet that reference the name & amount from the first sheet. in case a duplicate name exist in the original table, it should sum the amount. For example, look at the pic below. ABC is a duplicate name, and it's amount should be zero. How can I use Vlookup/index-match formulas in order to display "0" in the result when I lookup the name

Excel VBA DataObject:PutInClipboard Not Implemented

◇◆丶佛笑我妖孽 提交于 2019-12-08 06:33:36
问题 I maintain an Excel workbook with a bunch of VBA macros in it. The workbook has been in use for the past few months, mostly without any incident. We have a VBA function that is used to call other VBA functions. The purpose of it is to back up clipboard data, run the function, then restore clipboard data. It's pretty simple. Sub FunctionHandler() Dim clipboardData As New DataObject clipboardData.GetFromClipboard '' There are a dozen or so macros that can be called here Call AnyFunction() On

How to combine multiple VBA macros into one add-in file for Excel

落花浮王杯 提交于 2019-12-08 06:22:20
问题 I have written some 4 to 5 macros for Excel 2010, now I want to add all of these macros into a Custom Tab in the Ribbon as buttons. But I want to install all the macros as one complete package (or add-in). I have successfully installed one macro by creating a CustomUI package with the help of Visual Studio, but I don't know how to add other macros to the same add-in. 回答1: It depends on where you've stored your macro. For instance if your macro is saved in a module (within the Add-in file),

Map column data to matching rows

强颜欢笑 提交于 2019-12-08 05:53:51
问题 I have a sheet like this: | A | B | C | D | E | F | G | H | ... --------------------------------- | a | 1 | | b | 2 | | c | 7 | --------------------------------- | b | 2 | | c | 8 | | b | 4 | --------------------------------- | c |289| | a | 3 | | a |118| --------------------------------- | d | 6 | | e | 3 | | e |888| --------------------------------- | e | 8 | | d |111| | d |553| --------------------------------- I want the sheet to become like this: | A | B | C | D | E | F | G | H | ... ---