Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default Keeping calendar in one place

How do I keep the calendar in one place. As it is now when I click on one of
the intersect cells the calendar moves just under the cell covering other
information

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Keeping calendar in one place

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If

--
Regards,
Tom Ogilvy


"Oldjay" wrote:

How do I keep the calendar in one place. As it is now when I click on one of
the intersect cells the calendar moves just under the cell covering other
information

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default Keeping calendar in one place

Thanks

"Tom Ogilvy" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If

--
Regards,
Tom Ogilvy


"Oldjay" wrote:

How do I keep the calendar in one place. As it is now when I click on one of
the intersect cells the calendar moves just under the cell covering other
information

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default Keeping calendar in one place

Opps I spoke too soon. After I saved it and reopened it the calendar no
longer has the dates displayed all though when you click on a blank date it
displays the right date in the date cell.

"Oldjay" wrote:

Thanks

"Tom Ogilvy" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If

--
Regards,
Tom Ogilvy


"Oldjay" wrote:

How do I keep the calendar in one place. As it is now when I click on one of
the intersect cells the calendar moves just under the cell covering other
information

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Keeping calendar in one place

I didn't remove any code except the code that repositioned the calendar - per
your request.

--
Regards,
Tom Ogilvy


"Oldjay" wrote:

Opps I spoke too soon. After I saved it and reopened it the calendar no
longer has the dates displayed all though when you click on a blank date it
displays the right date in the date cell.

"Oldjay" wrote:

Thanks

"Tom Ogilvy" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If

--
Regards,
Tom Ogilvy


"Oldjay" wrote:

How do I keep the calendar in one place. As it is now when I click on one of
the intersect cells the calendar moves just under the cell covering other
information

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("C44:C45"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If

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
I want to place a calendar template on my desktop. AngieD Excel Worksheet Functions 1 December 17th 08 07:27 PM
Help with keeping formulas in place! tapuza Excel Discussion (Misc queries) 2 December 23rd 05 07:24 PM
Keeping cursor in same place on all worksheets in a workbook Phil Burgess Excel Worksheet Functions 1 December 23rd 05 01:32 PM
How do place a column of date/time information into a calendar for Linuxster Excel Discussion (Misc queries) 0 December 3rd 05 12:56 AM
Keeping cells in place Rj Excel Worksheet Functions 3 March 2nd 05 07:52 PM


All times are GMT +1. The time now is 06:30 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"