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 |
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 |
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 |
All times are GMT +1. The time now is 09:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com