![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 5
|
I created a template with an Auto_Open macro to display UserForm1. Once data is entered, user is prompted to save as a worksheet.
When the worksheet is opened, the Auto_Open macro runs and redisplays the UserForm1. I only want the UserForm to be displayed when the template is selected, not when a worksheet based on the template is opened. In Word could get around this with the AutoNew macro, but that doesn't exist in Excel. Any suggestions? Thanks. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
In the Auto_Open sub (Altough I REALLY prefer the Workbook_Open event) put something like this:
If ActiveWorkbook.Path = "" then 'Hasn't been saved, show Userform End If That, I think, should work. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|