![]() |
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 |
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 |
All times are GMT +1. The time now is 10:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com