Thread: Message Box
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Message Box

Put code like the following in the ThisWorkbook code module.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name = "Sheet1" Then
MsgBox "Hello world"
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"A-Design" wrote in message
...
Hi,

Is it possible to write a VBA on excel that when I click over a
specific worksheet's tab a message box pop-up and give me a
message?

Thanks in advance