Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find free sharware to include calendar pop or use calendar in cell ednc Excel Discussion (Misc queries) 2 April 14th 08 05:05 PM
how do i export excel calendar info to outlook calendar? Maggie Excel Discussion (Misc queries) 1 December 31st 07 10:27 PM
monthview calendar question/ want the calendar to display weekdays only.. [email protected] Excel Programming 0 August 26th 07 09:25 PM
Modify Yearly Calendar to Monthly Calendar Excel 2000? James Cooper Excel Programming 13 July 13th 06 11:46 PM
import calendar items from excel into outlook calendar jsewaiseh Excel Discussion (Misc queries) 0 September 2nd 05 03:53 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"