Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct Procedure to Open Help File? JK Excel Programming 0 June 22nd 06 06:32 AM
Write Procedure With Logic Test To Open File From Given Directory Carl Bowman Excel Programming 4 February 12th 05 02:15 AM
Using custom template with Excel.Workbook.SaveAs [email protected] Excel Programming 1 January 28th 05 04:16 AM
Why is my Workbook Open procedure not working Ron McCormick[_6_] Excel Programming 1 July 15th 04 12:13 PM
Workbook.Open Event Procedure not firing Gordon Rodman Excel Programming 1 October 17th 03 05:03 PM


All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"