I wrote a function called dot that calculates the "inner product" using arbitrary operators. It works like this
L M
1 2
3 4
=dot(L:L,M:M, "*", "+", 1)
This would return 1 * 2 + 3 * 4 = 14. You could replace '*' and '+' with '^' and '-' or whatever binary operators you like that work between two numbers.
The cool thing a...
I have just made an update to a dll that is called from VBA within Powerpoint. All development went fine, but when I tried to deploy on another users machine I get a problem that I have no idea how to debug.
What happens is that when the .Net object is created in the VBA, the reference that is returned is to the wrong object, so the ne...
Is it possible to start MAIL MERGE from excel macro (by clicking a button on sheet)
I have excel sheet with data and want to export it to new word doc.
...
I'm having trouble with the way I designed this little report I'm making. Is it possible to create a variable for a Range object in Excel VBA, for the purposes of applying the formatting to another Range? Here is my example:
I'm creating a dictionary from the Microsoft Scripting Runtime library:
Dim d as Scripting.Dictionary
With t...
I need to use VBA to read rows out of Excel into another application, but if the process dies in the middle, I need to know which rows were read.
Is the best way to put something in a column, per row, that says that row was done? Then save it after every row is read?
Doesn't seem like a great way.
Any help would be great. Thanks eve...
I am using conditional formatting in Excel 2007 to compare values row by row in cells H, K and U.
Since I am trying to use the conditional fomartting row by row instead of a range of cells.
My hand cramped up by row 50, and I have another few hundreds to go.
Is there a macro that would check the rows and paste the format without having...
Here is the code that applies an advanced filter to the column A on the Sheet1 worksheet (List range) by using the range of values on the Sheet2 (criteria range)
Range("A1:A100").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Sheets("Sheet2").Range("A1:A10"), Unique:=False
After running this code, I need to do somet...
I have some code which intercepts the Before_Print event in excel to make sure that the user has filled in all the required fields before they print the sheet. However, I only want this code to fire when the user is actually printing, not when they are just calling the print preview.
Is there any way to tell in the Before_Print code wh...
In VB6:
I need to allow a user to select an Excel file, and then upload All Worksheets to a SQL table. I'm not sure how to do this. The format of each sheet is exactly the same. And the worksheet format matches the SQL table format.
I'm really banging my head against the wall over here. If anybody could offer a suggestion, or a cod...
Hi Guys,
I am trying to collaborate with a graphic designer sitting on the other side of the world. The only communication medium we have is a phone line. Every time she makes even a minute change to an element on a page, she has to take a screenshot, save it and mail it - all manually till now.
As you can guess, this gets downright ir...
I have written several Subs to show/hide fields in a PivotTable.
Now I am trying to do the same with a calculated field, but I get an error when hiding it.
I took my code from the recorder and the recorder's code also halts on the last line.
I googled the error message, without serious result.
Sub PrRemove()
'remove PR
Dim pt As...
Hello
A friend of mine works as an analyst for an insurance company, and uses Visual Basic for Applications (VBA) to write scripts.
Since her company has offices in different European countries, she needs to make the scripts as language-independent as possible.
One issue that came out recently is how to handle Excel documents and refe...
I would like to copy a template sheet to the left of itself to be populated by a report generator. This all works fine.
However when it comes to the sheet copying line (shown below) their is a flash as excel appears and then disappears - though occasionally I am left with a blue, partially filled in excel window.
I already have Applic...
Hi,
I'm connecting to Excel with ADO, but it only works if I specify the sheet names. I won't know those at runtime. Is there any method to get the sheet names? Excel automation?
Thanks.
...
My Excel addin requires the Visual Basic for Applications option of Excel to be installed in order for it to work. I would like my install (which is written with InnoSetup) to be able to detect if VBA is installed and warn the user if it is not.
How can I detect if the option is already installed?
...
Do any VBA libraries exist which will allow me to use XPath 2.0 within VBA? MSXML6 does not work with XPath 2.0.
Basically, I want to parse XML documents using XPath 2.0 as it allows me to use functions within the XPath expression to filter the XML document. As an example, the usage of the function current-date() would be useful as I w...
hi i have the foll. code in VBA:
Dim A As Collection
Set A = New Collection
Dim Arr2(15, 5)
Arr2(1,1) = 0
....
A.Add (Arr2)
can you tell me how to access the Arr2 through A? For example i want to do the following
A.Item(1) (1,1) = 15
so the above would change ...
Hi,
I was using an Excel macro which uses mscomm32.ocx for communicating with the serial port. It was working fine until some one or two month back. Now when we try to run it again it is not working. When I try to load it, it says the "Subject is not trusted for the specified Action".
Can any one help me out!?
Thanks...
...
I have web service deployed in Web Sphere and this service is SSL enabled. I have to call this service from ms excel. I am using MSSOAPLib.SoapClient to call my web service. When I run this macro i am getting security related error. That is the public key should be stored in the client key store. Please let me know how to do this.
Also ...
In the code below, I take some input parameters, either text or a cell, and combine them to form one string using the formatting I need. I need to make Task_Name bold, as well as text like "Lead :". I know you cannot make text in a variable bold, but how do I go about this? This cell I'm storing the value in is eventually used in a Wo...