Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I posted this question already but I think I put it into the wrong area.
I have put a pop up calendar into a spreadsheet that is being used by several people at my office. I now need to add many new pages and I wondered if anyone can tell me how to make the pop up calendar work in the same cells in every worksheet in the workbook. I used the code from Ron's website as follows: Private Sub Calendar1_Click() ActiveCell.Value = CDbl(Calendar1.Value) ActiveCell.NumberFormat = "mm/dd/yyyy" ActiveCell.Select Calendar1.Visible = False End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Not Application.Intersect(Range("I6:I600"), 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 End Sub |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Klee
You can insert a calendar in every worksheet you want and also copy the same code in each worksheet. If you make a copy of the sheet it will also copy the event code and the control -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Klee" wrote in message ... I posted this question already but I think I put it into the wrong area. I have put a pop up calendar into a spreadsheet that is being used by several people at my office. I now need to add many new pages and I wondered if anyone can tell me how to make the pop up calendar work in the same cells in every worksheet in the workbook. I used the code from Ron's website as follows: Private Sub Calendar1_Click() ActiveCell.Value = CDbl(Calendar1.Value) ActiveCell.NumberFormat = "mm/dd/yyyy" ActiveCell.Select Calendar1.Visible = False End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Not Application.Intersect(Range("I6:I600"), 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 End Sub |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Ron. I had actually tried that prior to posting but it didn't work.
Once I read you post and realized it should have worked, I ended up copying the sheet into a new workbook then adding the calendar and coping the new sheets. It worked great this time. Thanks very much "Ron de Bruin" wrote: Hi Klee You can insert a calendar in every worksheet you want and also copy the same code in each worksheet. If you make a copy of the sheet it will also copy the event code and the control -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Klee" wrote in message ... I posted this question already but I think I put it into the wrong area. I have put a pop up calendar into a spreadsheet that is being used by several people at my office. I now need to add many new pages and I wondered if anyone can tell me how to make the pop up calendar work in the same cells in every worksheet in the workbook. I used the code from Ron's website as follows: Private Sub Calendar1_Click() ActiveCell.Value = CDbl(Calendar1.Value) ActiveCell.NumberFormat = "mm/dd/yyyy" ActiveCell.Select Calendar1.Visible = False End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Not Application.Intersect(Range("I6:I600"), 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 End Sub |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Jul 28, 1:36 pm, Klee wrote:
I posted this question already but I think I put it into the wrong area. I have put a pop upcalendarinto a spreadsheet that is being used by several people at my office. I now need to add many new pages and I wondered if anyone can tell me how to make the pop upcalendarwork in the same cells in every worksheet in the workbook. I used the code from Ron's website as follows: Private Sub Calendar1_Click() ActiveCell.Value = CDbl(Calendar1.Value) ActiveCell.NumberFormat = "mm/dd/yyyy" ActiveCell.Select Calendar1.Visible = False End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Not Application.Intersect(Range("I6:I600"), 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 theCalendar Calendar1.Value = Date ElseIf Calendar1.Visible Then Calendar1.Visible = False End If End Sub You may want to consider using a polished 3rd party solution. See http://www.wincalendar.com/excel-calendar.html for a very useful Excel pop-up calendar. Sam |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
applying rounding formula to entire worksheet | Excel Worksheet Functions | |||
Applying formula to an entire column | Excel Discussion (Misc queries) | |||
Format entire column with Calendar activex control? | Excel Discussion (Misc queries) | |||
Applying a formula to an entire column | Excel Discussion (Misc queries) | |||
Worksheet Changes and applying code | Excel Worksheet Functions |