Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Create a message to 'pop open'

I would like to know the code for use in a macro that will cause a Message to
'pop open' when I click on to another sheet, or close the file. The message
would read something like 'Before proceeding do you want to protect the
sheet?'

Thanks for any help.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Create a message to 'pop open'

Paste this into the Thisworkbook Module

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim strmsg As String

strmsg = ActiveSheet.Name & vbCrLf & "Would you like to Protect Sheet"
MsgBox strmsg
End Sub

"JoeP" wrote:

I would like to know the code for use in a macro that will cause a Message to
'pop open' when I click on to another sheet, or close the file. The message
would read something like 'Before proceeding do you want to protect the
sheet?'

Thanks for any help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Create a message to 'pop open'

Paste both oh these into thisworkbook module
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim strmsg As String

strmsg = "Before proceeding would you like to protect" _
& vbCrLf & ActiveSheet.Name
MsgBox strmsg
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim strmsg As String

strmsg = "Before proceeding would you like to protect" _
& vbCrLf & ActiveSheet.Name
MsgBox strmsg

End Sub

"JoeP" wrote:

I would like to know the code for use in a macro that will cause a Message to
'pop open' when I click on to another sheet, or close the file. The message
would read something like 'Before proceeding do you want to protect the
sheet?'

Thanks for any help.

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
linked PDF will not open "can not open specified file" is message DaveKC Excel Discussion (Misc queries) 0 February 19th 07 07:38 PM
Open Outlook with generic message jamphan Excel Discussion (Misc queries) 0 March 28th 06 03:59 PM
can i have a pop up reminder message when i open a workbook? j jones New Users to Excel 2 November 16th 05 08:07 PM
Cannot open Excel, message given is about VBA libraries? Kolbie Stuck Excel Discussion (Misc queries) 1 October 27th 05 07:00 PM
want to create a message box to appear on open Fionajpower Excel Discussion (Misc queries) 2 September 26th 05 12:59 PM


All times are GMT +1. The time now is 06:51 PM.

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

About Us

"It's about Microsoft Excel"