Is it possible to use VBA to reference a calendar macro (Personal.XLS!OpenCalaendar) in excel 2003?
The code that I am working with, thanks to user ID VOG, is below. The calendar would need to popup for offset 1 and 2. Thanks.
The code that I am working with, thanks to user ID VOG, is below. The calendar would need to popup for offset 1 and 2. Thanks.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim x As Variant
If Intersect(Target, Range("A3:A53")) Is Nothing Then Exit Sub
Cancel = True
x = Application.InputBox("Enter Case Number Between 1 and 50", "You must Enter a Value or click Cancel to exit this procedure", Type:=1)
If x = False Then Exit Sub
Target.Value = x
Do While Target.Value < 1 Or Target.Value > 50
Target.Value = InputBox("Enter a number Between 1 and 50", "Input Out of Range!")
Loop
Target.Offset(, 4).Value = InputBox("Enter Age", "You must Enter a Value")
Do While Target.Offset(, 4).Value < 1 Or Target.Offset(, 4).Value > 150
Target.Offset(, 4).Value = InputBox("Enter a number Between 1 and 150", "Input Out of Range!")
Loop
Target.Offset(, 8).Value = InputBox("Was LSAB Used", "You must Enter Yes or No")
Do While IsNumeric(Target.Offset(, 8).Value) Or Target.Offset(, 8).Value = ""
Target.Offset(, 8).Value = InputBox("Was LSAB Used", "Error!")
Loop
Target.Offset(, 9).Value = InputBox("Was SSPHR Used", "You must Enter Yes or No")
Do While IsNumeric(Target.Offset(, 9).Value) Or Target.Offset(, 9).Value = ""
Target.Offset(, 9).Value = InputBox("Was SSPHR Used", "Error!")
Loop
Target.Offset(, 10).Value = InputBox("Was SSPLR Used", "You must Enter Yes or No")
Do While IsNumeric(Target.Offset(, 10).Value) Or Target.Offset(, 10).Value = ""
Target.Offset(, 10).Value = InputBox("Was LSAB Used", "Error!")
Loop
Target.Offset(, 11).Value = InputBox("Was SBT Used", "You must Enter Yes or No")
Do While IsNumeric(Target.Offset(, 11).Value) Or Target.Offset(, 11).Value = ""
Target.Offset(, 11).Value = InputBox("Was SBT Used", "Error!")
Loop
Target.Offset(, 13).Value = InputBox("Enter Donor", "You must Enter Text")
Do While IsNumeric(Target.Offset(, 13).Value) Or Target.Offset(, 13).Value = ""
Target.Offset(, 13).Value = InputBox("Enter Donor", "Error!")
Loop
Target.Offset(, 14).Value = InputBox("Enter Description", "You must Enter Text")
Do While IsNumeric(Target.Offset(, 14).Value) Or Target.Offset(, 14).Value = ""
Target.Offset(, 14).Value = InputBox("Enter Description", "Error!")
Loop
End Sub