Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-Up Calendar
Excel XP & Win XP
I know there is a calendar capability within Excel but I have never used it. What I am asking for is a place/site to go to to get the information I need. What I want to do is this: The user clicks on a cell, firing a Worksheet_SelectionChange macro. This will cause a calendar to pop up. The user clicks on a date and that date is entered into that cell and the calendar disappears. Any help would be appreciated. Thanks for your time. Otto |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-Up Calendar
Hi Otto,
Maybe Ron de Bruin's site will be what your looking for.. http://www.rondebruin.nl/calendar.htm Hope this helps, Gav. "Otto Moehrbach" wrote: Excel XP & Win XP I know there is a calendar capability within Excel but I have never used it. What I am asking for is a place/site to go to to get the information I need. What I want to do is this: The user clicks on a cell, firing a Worksheet_SelectionChange macro. This will cause a calendar to pop up. The user clicks on a date and that date is entered into that cell and the calendar disappears. Any help would be appreciated. Thanks for your time. Otto |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-Up Calendar
following will produce popup calendar in all rows col A - change as required.
Paste in code page of required worksheet. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub With Calendar1 If Not Application.Intersect(Range("A:A"), Target) Is Nothing Then .Left = Target.Left + Target.Width - Calendar1.Width .Top = Target.Top + Target.Height .Visible = True ' select Today's date in the Calendar .Value = Date ElseIf .Visible Then .Visible = False End If End With End Sub Private Sub Calendar1_Click() With ActiveCell .Value = CDbl(Calendar1.Value) .NumberFormat = "mm/dd/yyyy" .Select End With If Calendar1.Visible Then Calendar1.Visible = False End Sub -- JB "Gav123" wrote: Hi Otto, Maybe Ron de Bruin's site will be what your looking for.. http://www.rondebruin.nl/calendar.htm Hope this helps, Gav. "Otto Moehrbach" wrote: Excel XP & Win XP I know there is a calendar capability within Excel but I have never used it. What I am asking for is a place/site to go to to get the information I need. What I want to do is this: The user clicks on a cell, firing a Worksheet_SelectionChange macro. This will cause a calendar to pop up. The user clicks on a date and that date is entered into that cell and the calendar disappears. Any help would be appreciated. Thanks for your time. Otto |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-Up Calendar
Hi
1. open the VB editor in Excel and do Insert, Userform. you get a blank form called Userform1 and the control toolbox. right click the control toolbox and select Additional Controls. Scroll down the list and if you see Calendar Control then select it. Drag the calendar icon from the toolbox to the userform and resize as required. If you don't see the Calendar control in the list then it has not been installed. Talk to your techy people. 2. Also from the toolbox drag a couple of command buttons onto your userform. Call them OK and Cancel, or whatever you think appropriate. Double click the OK button and you will get this: Private Sub CommandButton1_Click() End Sub Edit it to give you this Private Sub CommandButton1_Click() Selection.Value = Userform1.Calendar1.Value Unload Me End Sub Double click the Cancel button to create this sub Private Sub CommandButton2_Click() Unload Me End Sub 3. For the Worksheet_SelectionChange macro do Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'some stuff restricting Target rnage UserForm1.Show End Sub That should get you started. regards Paul On Mar 5, 11:57*am, "Otto Moehrbach" wrote: Excel XP & Win XP I know there is a calendar capability within Excel but I have never used it. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pop-Up Calendar
Gav, John, Paul
Thanks for your time. This is big help. Otto "Otto Moehrbach" wrote in message ... Excel XP & Win XP I know there is a calendar capability within Excel but I have never used it. What I am asking for is a place/site to go to to get the information I need. What I want to do is this: The user clicks on a cell, firing a Worksheet_SelectionChange macro. This will cause a calendar to pop up. The user clicks on a date and that date is entered into that cell and the calendar disappears. Any help would be appreciated. Thanks for your time. Otto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find free sharware to include calendar pop or use calendar in cell | Excel Discussion (Misc queries) | |||
how do i export excel calendar info to outlook calendar? | Excel Discussion (Misc queries) | |||
monthview calendar question/ want the calendar to display weekdays only.. | Excel Programming | |||
Modify Yearly Calendar to Monthly Calendar Excel 2000? | Excel Programming | |||
import calendar items from excel into outlook calendar | Excel Discussion (Misc queries) |