Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Word, I've built templates containing a Sub AutoNew procedure where a
userform opens only when a new document is created from them. After that, upon reopening the document, the form no longer shows. Does Excel have an equivalent to AutoNew? I want users (when they choose File New to create a new spreadsheet from a template) only to see a userform the first time they use the template, not when subsequently reopening the spreadsheet. Thanks! Steve C |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not really.
But you could use Auto_open() and check to see if it's a template: Option Explicit sub Auto_open() if thisworkbook.path < "" then exit sub end if 'do the real work end sub Steve C wrote: In Word, I've built templates containing a Sub AutoNew procedure where a userform opens only when a new document is created from them. After that, upon reopening the document, the form no longer shows. Does Excel have an equivalent to AutoNew? I want users (when they choose File New to create a new spreadsheet from a template) only to see a userform the first time they use the template, not when subsequently reopening the spreadsheet. Thanks! Steve C -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Dave. That gives me a good work-around.
"Dave Peterson" wrote: Not really. But you could use Auto_open() and check to see if it's a template: Option Explicit sub Auto_open() if thisworkbook.path < "" then exit sub end if 'do the real work end sub Steve C wrote: In Word, I've built templates containing a Sub AutoNew procedure where a userform opens only when a new document is created from them. After that, upon reopening the document, the form no longer shows. Does Excel have an equivalent to AutoNew? I want users (when they choose File New to create a new spreadsheet from a template) only to see a userform the first time they use the template, not when subsequently reopening the spreadsheet. Thanks! Steve C -- Dave Peterson |