Workbook1 opens Workbook2 and runs Workbook2's macro

C

chuck buchanan

Workbook1 has code below:

Workbooks.Open Filename:="Workbook2.xls"

Workbook2 has this pertinent code:

Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("00:00:01"), "myFormShow"
End Sub

Sub myFormShow()
myOrder.show
End Sub

Workbook1 does open Workbook2, but the designated form does not appear.

Is there a better (i.e., "correct") way to ensure that the form appears?

Thanks for your consideration.
 
T

Tom Hutchins

Your myFormShow() subroutine needs to be in a VBA module. I am guessing that
you have it in the ThisWorkbook module along with the Workbook_Open event
code.

Hope this helps,

Hutch
 
C

chuck buchanan

actually, it is in a module ... my bad on the presentation of my issue ...
thanks, though
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top