Thread: AutoNew
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default AutoNew

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