Thread
:
Show form based on file type
View Single Post
#
2
Posted to microsoft.public.excel.programming
Tom Ogilvy
external usenet poster
Posts: 27,285
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 With Quote
Tom Ogilvy
View Public Profile
Find all posts by Tom Ogilvy