Popup when file name is "X" but when it is changed dont create popup

ulpk29

New Member
Joined
Mar 6, 2019
Messages
6
Currently I am using the following in a spreadsheet we use for internal reviews.

Code:
Private Sub Workbook_Open()
MsgBox "Click OK, then please save with your file name before entering information onto the form", vbOKOnly + vbExclamation, "ATTENTION!!!"
End Sub


Is there some language I can use to stop the popup appearing once a user changes the filename from "X" to the standard we use when storing on our server?

Thank you for your input, I really appreciate it.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Something like
Code:
Private Sub Workbook_Open()
   If Me.name = "xxx.xlsm" Then
      MsgBox "??"
   End If
End Sub
 
Last edited:
Upvote 0
That did it. Thank you! I just couldn't think of how to write it, but the syntax makes sense now that I see it.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top