ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Private Macro (https://www.excelbanter.com/excel-programming/429615-private-macro.html)

Fan924

Private Macro
 
When I change "Sub WBMoved" to
"Private Sub WBMoved"
Can it be accessed from other worbooks?

Homey

Private Macro
 
yes if you use "run"

Sub test_run()
Run "Book1.xls!SubInOtherWB"
End Sub

no if you use reference.

Sub test_callByName()
SubInOtherWB
End Sub

"Fan924" wrote in message
...
| When I change "Sub WBMoved" to
| "Private Sub WBMoved"
| Can it be accessed from other worbooks?


Fan924

Private Macro
 
Thanks


All times are GMT +1. The time now is 06:26 AM.

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