Macro Question?

  • Thread starter Thread starter Greg B
  • Start date Start date
G

Greg B

Is it possible to have excel change a macro after the first use? What I mean
is when once you save the workbook I have created a certain splash screen
will show instead of the other one?


Thanks in advance


Greg
 
No, I am asking is it possible to cancel a userform that starts on loading a
form for the first time and is it possilble to make a macro to stop this
userform from loading again.
 
Does something like this work:

Option Explicit

Sub OpenMyForm()
If Not Range("A1") = "Don't Open" Then
UserForm1.Show
End If
End Sub


With the userform code:

Private Sub UserForm_Initialize()

Range("A1") = "Don't Open"

End Sub
 
Or

Sub OpenMyForm()
If ActiveWorkbook.Saved Then
UserForm1.Show
End If
End Sub
 
Greg,

I would create a public Boolean variable, and set that after first run, and
when displaying the splash screen, check its status to see which to display.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Why not delete the first form after it has shown. Design your code to check
for its existence and show the second if the first does not exist. Of
course the workbook would need to be saved after you delete the first form.

http://www.cpearson.com/excel/vbe.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top