Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook1 opens Workbook2 and runs Workbook2's macro
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. -- Chuck Buchanan Special Projects Coordinator |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook1 opens Workbook2 and runs Workbook2's macro
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 "chuck buchanan" wrote: 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. -- Chuck Buchanan Special Projects Coordinator |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook1 opens Workbook2 and runs Workbook2's macro
actually, it is in a module ... my bad on the presentation of my issue ...
thanks, though -- Chuck Buchanan Special Projects Coordinator "Tom Hutchins" wrote: 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 "chuck buchanan" wrote: 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. -- Chuck Buchanan Special Projects Coordinator |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cut/Paste Certain Rows from Workbook1 to Workbook2 | Excel Programming | |||
Extracting data from workbook1 to workbook2 | Excel Worksheet Functions | |||
Copying Selected Rows From Workbook1 to WorkBook2 | Excel Discussion (Misc queries) | |||
Can we copy a sheet from workbook1 to workbook2 with out open workbook1? | Excel Programming | |||
How to save the workbook1 from workbook2 | Excel Programming |