Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default message box in worksheet

Hello I have a message box - the code is below.
( I do not want to use validation)
I understand that the box below is for when the worksbook is open but I do
not know how to change it so that is applies when cell D13 is selected in
worksheet entitled Form
Private Sub Workbook_Open()
Call Form23
End Sub
Sub Form23()
Dim Msg As String
Msg = "Complete Attached Form " & vbCrLf
Msg = Msg & "Submit Invoice" & vbCrLf
Msg = Msg & "Copy your Manager"
MsgBox Msg, vbInformation, "Don't Forget"
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,510
Default message box in worksheet

Hi,

Right click on the worksheet name tab.
Select View Code
Copy the following into the VBA editor

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim isect As Object

Set isect = Application.Intersect(Target, Range("D13"))
If Not isect Is Nothing Then
Call Form23
End If

End Sub

Sub Form23()
Dim Msg As String
Msg = "Complete Attached Form " & vbCrLf
Msg = Msg & "Submit Invoice" & vbCrLf
Msg = Msg & "Copy your Manager"
MsgBox Msg, vbInformation, "Don't Forget"
End Sub


--
Regards,

OssieMac


"Wanna Learn" wrote:

Hello I have a message box - the code is below.
( I do not want to use validation)
I understand that the box below is for when the worksbook is open but I do
not know how to change it so that is applies when cell D13 is selected in
worksheet entitled Form
Private Sub Workbook_Open()
Call Form23
End Sub
Sub Form23()
Dim Msg As String
Msg = "Complete Attached Form " & vbCrLf
Msg = Msg & "Submit Invoice" & vbCrLf
Msg = Msg & "Copy your Manager"
MsgBox Msg, vbInformation, "Don't Forget"
End Sub

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
email message on worksheet rj shoe[_2_] Excel Discussion (Misc queries) 1 September 3rd 08 02:06 PM
using VBA how can I delete a worksheet w/o the warning message pop Jim K.[_2_] Excel Discussion (Misc queries) 2 July 1st 08 04:00 PM
Pop up message on Worksheet Tommo Excel Discussion (Misc queries) 3 October 5th 07 06:10 AM
Message on opening of worksheet Ruth Excel Discussion (Misc queries) 1 August 22nd 07 05:40 AM
Message -- Worksheet xls. is locked for editing. What is this? gman Excel Discussion (Misc queries) 2 April 21st 05 05:42 PM


All times are GMT +1. The time now is 05:53 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"