ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   add a dropdown calendar to a worksheet? (https://www.excelbanter.com/excel-programming/402825-add-dropdown-calendar-worksheet.html)

rongripon

add a dropdown calendar to a worksheet?
 
I would like to use a simple method to add a dropdown calendar to a worksheet
--
RGGSR

Mike Fogleman

add a dropdown calendar to a worksheet?
 
Here is some code I have in a worksheet module:

Private Sub Calendar1_Click()
ActiveCell.NumberFormat = "m/d/yyyy"
ActiveCell = Calendar1.Value
Calendar1.Visible = False
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("O6"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Value = Date
Calendar1.Visible = True
ElseIf Not Application.Intersect(Range("D21:D27"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else
Calendar1.Visible = False
Exit Sub
End If
End Sub

Mike F
"rongripon" wrote in message
...
I would like to use a simple method to add a dropdown calendar to a
worksheet
--
RGGSR




Nozza

add a dropdown calendar to a worksheet?
 
On Sun, 16 Dec 2007 04:56:01 -0800, rongripon
wrote:

I would like to use a simple method to add a dropdown calendar to a worksheet


http://my.opera.com/schnedster/blog/

has an example of this, plus a walkthrough of how to get it working.

Noz
--
Email (ROT13)


Ron de Bruin

add a dropdown calendar to a worksheet?
 
See this page for more info
http://www.rondebruin.nl/calendar.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"rongripon" wrote in message ...
I would like to use a simple method to add a dropdown calendar to a worksheet
--
RGGSR


Ron de Bruin

add a dropdown calendar to a worksheet?
 
You can use this for a range with more areas Mike

Note: You can use this if your range is not one area
If Not Application.Intersect(Range("A1:A20,C1,E1"), Target) Is Nothing Then

See my webpage


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Mike Fogleman" wrote in message ...
Here is some code I have in a worksheet module:

Private Sub Calendar1_Click()
ActiveCell.NumberFormat = "m/d/yyyy"
ActiveCell = Calendar1.Value
Calendar1.Visible = False
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("O6"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Value = Date
Calendar1.Visible = True
ElseIf Not Application.Intersect(Range("D21:D27"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else
Calendar1.Visible = False
Exit Sub
End If
End Sub

Mike F
"rongripon" wrote in message
...
I would like to use a simple method to add a dropdown calendar to a
worksheet
--
RGGSR





All times are GMT +1. The time now is 10:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com