• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

vba code for pop up box anytime a certain sheet is active

arobbins10

New Member
It's been years since I did anything in VBA code so, although I think this one is pretty straight forward, I can't get the thing to work.

I have a workbook with multiple worksheets in it. Anytime the user ends up on the worksheet called "Your Consumer", I want a msgbox to pop up with a few warnings about how to enter the data on the sheet. I tried the following but neither worked:

Sub test()
On Error Resume Next
If ActiveWorkbook.Worksheets("Buyer Demo") Is ActiveSheet Then MsgBox ("test")
On Error GoTo 0
End Sub

Sub Test()

If ActiveSheet.Name = "Your Consumer" Then
MsgBox "test"
End If

End Sub


Little help? Thanks!
 
Back
Top