View Single Post
  #34   Report Post  
Posted to microsoft.public.excel.misc
tmirelle tmirelle is offline
external usenet poster
 
Posts: 26
Default ho do i insert calendar into xls worksheet

I am trying to get the calendar to pop up everytime you are in the date
column... to help the user get it in in the right format.

Is that possible?

"Ron de Bruin" wrote:

Hi

When you use the code from my page you only have to add the calendar to the worksheet
with Insert Object

Read the page again
http://www.rondebruin.nl/calendar.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"tmirelle" wrote in message ...
How do you tell what the calendar is named?

I tried just using calendar.... but that didn't work either.

I folled the instructions on this page:
http://www.fontstuff.com/vba/vbatut07.htm

& then I inserted this code on the sheet:

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

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Application.Intersect(Range("A1:A20"), 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
.

"Ron de Bruin" wrote:

Hi Drahos

Maybe the Calendar you have add to the worksheet is not named
Calendar1

Check out the name

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Drahos" wrote in message ...
Hi Paul,
I need to use in my Excel Form a calender as described. I have done what
was recommeded on the webside you are reffering to. While choosing a cell
from the range where should be the calendar I receive the Runtime error "424"
- object required and the Debug shows this line:
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width

If choosing a cell outside of the range I receive the same runtime error and
the Debug shows this line:

ElseIf Calendar1.Visible Then Calendar1.Visible = False

I use the Excel 2003.

Please, can you advice me what the problem is.
Thanks a lot.


"Paul B" wrote:

halina, here is one way,
http://www.rondebruin.nl/calendar.htm
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"halina" wrote in message
...