#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default Pop-Up Calendar

I have an Excel 2003 spreadsheet with 3 separate pop-up calendars, basically
there is one at the top, one in the middle and one at the end. I used Ron de
Bruins code for his pop up calendar. I changed the code to €˜calendar 2 and
€˜calendar3 to hopefully get them to work separately but it doesnt seem to
work. Could someone advise me on what I may be doing wrong.

Lynda
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Pop-Up Calendar

What is not working for you - there are 2 pieces to Ron's code: moving value
from the calendar(s) to the worksheet, and the other way around.

I placed 3 calendar controls on an Excel 2003 sheet and this code worked for
me:

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Private Sub Calendar2_Click()
ActiveCell.Value = CDbl(Calendar2.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Private Sub Calendar3_Click()
ActiveCell.Value = CDbl(Calendar3.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Did you put the code into the worksheet's code module? Choose the sheet
with the calendar controls on it and then right-click the sheet's name tab
and choose [View Code] from the list. The code module for the worksheet will
appear and that is the module that you should put the code into.




"Lynda" wrote:

I have an Excel 2003 spreadsheet with 3 separate pop-up calendars, basically
there is one at the top, one in the middle and one at the end. I used Ron de
Bruins code for his pop up calendar. I changed the code to €˜calendar 2 and
€˜calendar3 to hopefully get them to work separately but it doesnt seem to
work. Could someone advise me on what I may be doing wrong.

Lynda

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Pop-Up Calendar

On the off chance that your calendars were given names other than Calendar1,
Calendar2 and Calendar3 you can use this code to determine what their names
on the sheet a

Sub GetShapesNames()
Dim anyShape As Shape
For Each anyShape In ActiveSheet.Shapes
MsgBox anyShape.Name
Next
End Sub

You can put that code into a standard code module or even into the
worksheet's code module and run it from there using [F5] while in the VB
Editor. It will show you the names of all shapes on the active sheet, one at
a time.


"JLatham" wrote:

What is not working for you - there are 2 pieces to Ron's code: moving value
from the calendar(s) to the worksheet, and the other way around.

I placed 3 calendar controls on an Excel 2003 sheet and this code worked for
me:

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Private Sub Calendar2_Click()
ActiveCell.Value = CDbl(Calendar2.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Private Sub Calendar3_Click()
ActiveCell.Value = CDbl(Calendar3.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Did you put the code into the worksheet's code module? Choose the sheet
with the calendar controls on it and then right-click the sheet's name tab
and choose [View Code] from the list. The code module for the worksheet will
appear and that is the module that you should put the code into.




"Lynda" wrote:

I have an Excel 2003 spreadsheet with 3 separate pop-up calendars, basically
there is one at the top, one in the middle and one at the end. I used Ron de
Bruins code for his pop up calendar. I changed the code to €˜calendar 2 and
€˜calendar3 to hopefully get them to work separately but it doesnt seem to
work. Could someone advise me on what I may be doing wrong.

Lynda

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 115
Default Pop-Up Calendar

Thank you 'J', I have used Ron's code before on many other sheets and the
'Calendar1' code is working fine, but for some reason when I change it to
Calendar2 and Calendar3 these 2 don't want to work. I have a lot of code on
sheet1 those being code for triple drop-downs and then more code for a single
drop-down. If there is too much code on one sheet will that start to affect
the operation of the other codes?

"JLatham" wrote:

On the off chance that your calendars were given names other than Calendar1,
Calendar2 and Calendar3 you can use this code to determine what their names
on the sheet a

Sub GetShapesNames()
Dim anyShape As Shape
For Each anyShape In ActiveSheet.Shapes
MsgBox anyShape.Name
Next
End Sub

You can put that code into a standard code module or even into the
worksheet's code module and run it from there using [F5] while in the VB
Editor. It will show you the names of all shapes on the active sheet, one at
a time.


"JLatham" wrote:

What is not working for you - there are 2 pieces to Ron's code: moving value
from the calendar(s) to the worksheet, and the other way around.

I placed 3 calendar controls on an Excel 2003 sheet and this code worked for
me:

Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Private Sub Calendar2_Click()
ActiveCell.Value = CDbl(Calendar2.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Private Sub Calendar3_Click()
ActiveCell.Value = CDbl(Calendar3.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub

Did you put the code into the worksheet's code module? Choose the sheet
with the calendar controls on it and then right-click the sheet's name tab
and choose [View Code] from the list. The code module for the worksheet will
appear and that is the module that you should put the code into.




"Lynda" wrote:

I have an Excel 2003 spreadsheet with 3 separate pop-up calendars, basically
there is one at the top, one in the middle and one at the end. I used Ron de
Bruins code for his pop up calendar. I changed the code to €˜calendar 2 and
€˜calendar3 to hopefully get them to work separately but it doesnt seem to
work. Could someone advise me on what I may be doing wrong.

Lynda

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
Convert date from Gregorian Calendar to Hijri Calendar H.Alkhodary Excel Discussion (Misc queries) 1 February 21st 09 10:11 AM
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
excel calendar - list of names displayed on calendar Brian'88 Excel Worksheet Functions 3 November 17th 06 10:31 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 09:14 PM.

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"