Calendar Problem- What's Wrong?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get a calendar to come up in a cell. I have tried Ron De
Bruins way and I can't get the calendar to pop up or disappear it just stays
where I put it.. Where do I put the object? I have 2 cells that need dates C3
and C4. Any help would be appreciated. Thanks
 
I changed something and it worked. Is it possible to get the calender to come
up either to the immediate right of the cells or starting at a particular
cell location. At the moment it covers the other cell that requires a date
and I would like both visible. The cells Are C3 and C4. Thanks again.
 
I think the name in your first test was not Calendar1

Try this

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("C3:C4"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Offset(1, 0).Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
Else: Calendar1.Visible = False
End If
End Sub
 
Thanks Ron. One more for ya. When the calendar comes up there are some cells
underneath the calendar that are a lines around the cells. This line crosses
through the calendar which won't allow me to select any of the dates that the
line croses through. When I select the next calendar box the calendar moves
down and the line moves up which doesn't allow me to select from that row of
dates.
Any Ideas?
Thanks again.
 
Hi Tim

You can't have two Worksheet_SelectionChange events in one sheet
Make the calandar work the way you want it in a new workbook.
If it is working then try to let it work with your existing code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top