View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default macro help please

If I don't want users to save over my original workbook, I'll use windows
explorer and mark it readonly.

It stops most of the problems. But I do keep a backup just in case.

But you could use Auto_Open() to do what you want.

Option Explicit
Sub Auto_Open()

Dim Resp As Long
Resp = MsgBox(Prompt:="Do you want to save this as a new name?", _
Buttons:=vbYesNo)

If Resp = vbYes Then
Application.Dialogs(xlDialogSaveAs).Show
End If
End Sub


Ryk wrote:

Beautiful Dave! Worked like a charm! Hopefully I can sneak in a
second request. After adding that and talking with a co-worker, I came
to realize we only have one other area to address in making the program
safe for multi-user use. I'll be looking into it, but can we make the
saved main program open up and right off the bat and request the user
save it as a different name so the source stays safe? Maybe make it so
they have to save it as a different name or it won't work. I assume I
need find start code, and try and get the code to check the filename,
if its the source name ask to save, if its not then it opens no
problem.

Anyways Dave, this is I think your third major help given to me, you
make me look awful smart, and that is hard to do.

Cheers

Dave (AKA Ryk)


--

Dave Peterson