Problem with ExecuteExcel4Macro

sethmac86

New Member
Joined
Jul 11, 2011
Messages
22
Hello I am using the ExecuteExcel4Macro to find the value of a cell in another file without opening the file. All is working however when first opening the spreadsheet and running the macro which calls ExecuteExcel4Macro it returns null values, however 2nd time around (by activating it myself within VBA) it works just fine?

I am passing the location of a cell value as a text string to ExecuteExcel4Macro and have it working properly, just not after inital startup/load of the spreadsheet... any ideas?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
When I try running the code the 1st time, i get that the return value from ExecuteExcel4Macro is "Error 2023"... then when I add ExecuteExcel4Macro to the watches it will then clear the error and display the correct value....???? what in the world is going on???
 
Upvote 0

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top