Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 135
Default Display MsgBox when selecting a sheet

Is there a way that I can have a message box display whenever a particular
sheet is selected?

Thanks,
~ Horatio
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Display MsgBox when selecting a sheet

Horatio,

Right click the sheet tab, view code and paste this in

Private Sub Worksheet_Activate()
msg = "You activated "
MsgBox msg & ActiveSheet.Name
End Sub

Mike

"Horatio J. Bilge, Jr." wrote:

Is there a way that I can have a message box display whenever a particular
sheet is selected?

Thanks,
~ Horatio

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 638
Default Display MsgBox when selecting a sheet

Right click on the sheet tad where you want this to happen and select
View Code. Then paste in the code below. Modify the message box as
needed.
Private Sub Worksheet_Activate()
MsgBox "your stuff here!"
End Sub

Horatio J. Bilge, Jr.
wrote:
Is there a way that I can have a message box display whenever a particular
sheet is selected?

Thanks,
~ Horatio


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 135
Default Display MsgBox when selecting a sheet

Thanks. It works great.
I was trying to use Workbook_SheetChange, but then I got the message for all
sheets, and I didn't know how to isolate the single sheet.

~ Horatio

"Mike H" wrote:

Horatio,

Right click the sheet tab, view code and paste this in

Private Sub Worksheet_Activate()
msg = "You activated "
MsgBox msg & ActiveSheet.Name
End Sub

Mike

"Horatio J. Bilge, Jr." wrote:

Is there a way that I can have a message box display whenever a particular
sheet is selected?

Thanks,
~ Horatio

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro display Msgbox when cells are empty jackie Excel Discussion (Misc queries) 2 May 30th 07 05:48 PM
How to display remaining txt file which overflowed MsgBox display? EagleOne Excel Discussion (Misc queries) 1 November 2nd 06 01:10 PM
VB evaluate a value in a table's column and display msgbox AusTexRich Excel Discussion (Misc queries) 8 October 10th 05 10:23 PM
display cell value in msgbox formatted as % rgarber50 Excel Discussion (Misc queries) 5 July 10th 05 03:27 PM
Excel workbook fails to display when selecting from my documents. 4jjgolly Excel Worksheet Functions 1 March 9th 05 12:48 AM


All times are GMT +1. The time now is 09:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"