From: Mike H. on
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!
From: JLGWhiz on
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." <MikeH(a)discussions.microsoft.com> wrote in message
news:4727B3E3-802E-47EF-A2C8-7032421AE8E9(a)microsoft.com...
>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!