Call a Sub from another Worksheet
Hi Mike, It's all in the Quote marks. Note the Apotrophe enclosed in double
quotes on both ends of the file name variable.
Application.Run "'" & wb.Name & "'" & "!CreateSubmittal"
"Mike H." wrote in message
...
I can't seem to get this to work:
Dim wb As Workbook
Set wb = Workbooks.Open("z:\journal entry.xlsm")
Application.Run wb.Name & "!CreateSubmittal"
The Sub CreateSubmittal is designated as "Public Sub CreateSubmittal()" or
not.
The Sub is in the THisWorkbook object or Module1. Neither works.
Ideas? Thanks!
|