Thread: Pop-Up Calendar
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
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.