Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Workbook Open Procedure in Custom Template File
I have an Excel file containing raw data (e.g. "RawData.xls") that must be
automatically formatted according to a customized report template. In this raw data file I have a custom toolbar button thats assigned a hyperlink to my Excel report template (e.g. €œReportTemplate.xlt€). The Excel template has a Workbook_Open() procedure that automatically formats the raw data file then closes itself leaving the newly formatted raw data report open. Everything gets formatted perfectly, however, after completing the formatting and closing the report template file a Microsoft Office dialogue box pops up asking me if I would like to open the file €œReportTemplate.xlt€. I dont understand why its attempting to reopen my template again? Any insight and suggestions would be appreciated. Heres a snippet of the Open Workbook procedure contained in €œReportTemplate.xlt€ : Private Sub Workbook_Open() ' turn off warning messages Application.DisplayAlerts = False ' Switch to raw data sheet Workbooks("RawData.xls").Activate Range("A1").Select €¦. €˜ Format Raw data file code is omitted for simplicity sake €¦ €˜ Close €œReportTemplate.xlt€ without saving changes Workbooks("ReportTemplate.xlt").Close SaveChanges:=False End Sub Note: Even if I reduce the Open Workbook procedure to the lines shown above, I still receive the Microsoft Office dialogue box asking me if I would like to open the template file again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Correct Procedure to Open Help File? | Excel Programming | |||
Write Procedure With Logic Test To Open File From Given Directory | Excel Programming | |||
Using custom template with Excel.Workbook.SaveAs | Excel Programming | |||
Why is my Workbook Open procedure not working | Excel Programming | |||
Workbook.Open Event Procedure not firing | Excel Programming |