calendar

cmccabe

Active Member
Joined
Feb 20, 2008
Messages
396
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.

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
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,224,583
Messages
6,179,678
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top