ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   run a procedure in 1 wkbk from another wkbk (https://www.excelbanter.com/excel-programming/333872-run-procedure-1-wkbk-another-wkbk.html)

carenla

run a procedure in 1 wkbk from another wkbk
 
I am trying to have my procedure open up another workbook file and
then my procedure needs to run procedure(s) in the the opened file then
return control to my main procedure.

Below are the call statements I have tried along with their error messages:

Call cmdRetrieveData1_Click (error: sub or function not define)
(but it is defined in the other open workbook and the name is correct!)

Call [Newfile.xls].[Newfile.vbp].[Module4].cmdRetrieveData1_Click
(error: subscript out of range)

Help! I need to resolve quickly.




Bob Phillips[_7_]

run a procedure in 1 wkbk from another wkbk
 

Application.Run "OtherBook!myMacro.xls"

--
HTH

Bob Phillips

"carenla" wrote in message
...
I am trying to have my procedure open up another workbook file and
then my procedure needs to run procedure(s) in the the opened file then
return control to my main procedure.

Below are the call statements I have tried along with their error

messages:

Call cmdRetrieveData1_Click (error: sub or function not define)
(but it is defined in the other open workbook and the name is correct!)

Call [Newfile.xls].[Newfile.vbp].[Module4].cmdRetrieveData1_Click
(error: subscript out of range)

Help! I need to resolve quickly.







All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com