Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Show form based on file type
G'day,
I have a template that I want to be able to open a different userform depending on the type of document, e.g. when I open the template I want userform1 to open, when I create a new spreadsheet based on the template, I want userform2 to open. Is there anyway that I can do this? I have tried using an auto open macro (MS Office 2000), to detect the filename (ie filename.xlt or newfile1.xls) but this doesn't work. Any suggestions? Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Show form based on file type
If you are editing the template, the extension should be
xlt If lcase(Right(thisworkbook.name,3)) = "xlt" then ' template else ' workbook End if -- Regards, Tom Ogilvy "Billie Mac" <Billie wrote in message ... G'day, I have a template that I want to be able to open a different userform depending on the type of document, e.g. when I open the template I want userform1 to open, when I create a new spreadsheet based on the template, I want userform2 to open. Is there anyway that I can do this? I have tried using an auto open macro (MS Office 2000), to detect the filename (ie filename.xlt or newfile1.xls) but this doesn't work. Any suggestions? Thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with a project sheet, need date to show/not show based o | Excel Discussion (Misc queries) | |||
Formula (off form) that completes form data based on a result | Excel Worksheet Functions | |||
when I type in 0 it does not show | Excel Discussion (Misc queries) | |||
Can't start Excel based on File Type | Excel Discussion (Misc queries) | |||
Help! Animated gif-image in form does not show animation when form loaded | Excel Programming |