#1
|
||||
|
||||
Message Box vba when a sheet is activated
Hi. I copied this code from Ablebits that gives me the right message when Sheet X is selected. How do I add to the code that if Sheet X or Y or Z is selected, the same message box pops up?
Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object) On Error Resume Next If Sh.Name = "Sheet X" Then MsgBox "Print Form 2307", vbInformation, "Print 2307 Message" End If End Sub Last edited by Marcia; 09-28-2022 at 03:33 PM. Reason: typo |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to remove MS 365 that was not activated? | junkcarp | Office | 3 | 04-29-2022 11:01 AM |
This copy of MS Office not activated | chzuck | Office | 1 | 10-10-2021 03:10 PM |
Is my Office 'activated' or not? | mabel | Office | 6 | 08-01-2019 04:18 AM |
ActiveX is not activated when opening Excel2016 sheet | Pierrot | Excel Programming | 0 | 10-28-2016 03:33 AM |
Hyperlink not activated by footpedal | Donone | PowerPoint | 2 | 05-05-2014 04:42 AM |