#1   Report Post  
Alexanderj
 
Posts: n/a
Default Calender Help


Hi

Please can someone help me, i am designing an Excel worksheet to hold
dates and calculate days, i have two fields one for "start date" and
one for "end date" what i would like to know is, is it possible when a
cell is clicked under "start Date" a little calender pops up a date is
chosen and is displayed in the selected cell. If it is possible please
can someone help me.

Many thanks


--
Alexanderj
------------------------------------------------------------------------
Alexanderj's Profile: http://www.excelforum.com/member.php...o&userid=28704
View this thread: http://www.excelforum.com/showthread...hreadid=483870

  #2   Report Post  
 
Posts: n/a
Default Calender Help

This will require some VBA
two links where I learnt it from
http://www.rondebruin.nl/calendar.htm
http://www.fontstuff.com/vba/vbatut07.htm

hth RES
  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default Calender Help

http://www.rondebruin.nl/calendar.htm

--

Regards,

Peo Sjoblom

"Alexanderj" wrote
in message ...

Hi

Please can someone help me, i am designing an Excel worksheet to hold
dates and calculate days, i have two fields one for "start date" and
one for "end date" what i would like to know is, is it possible when a
cell is clicked under "start Date" a little calender pops up a date is
chosen and is displayed in the selected cell. If it is possible please
can someone help me.

Many thanks


--
Alexanderj
------------------------------------------------------------------------
Alexanderj's Profile:

http://www.excelforum.com/member.php...o&userid=28704
View this thread: http://www.excelforum.com/showthread...hreadid=483870



  #4   Report Post  
swatsp0p
 
Posts: n/a
Default Calender Help


Alexanderj Wrote:
Hi

Please can someone help me, i am designing an Excel worksheet to hold
dates and calculate days, i have two fields one for "start date" and
one for "end date" what i would like to know is, is it possible when a
cell is clicked under "start Date" a little calender pops up a date is
chosen and is displayed in the selected cell. If it is possible please
can someone help me.

Many thanks


Try this:Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "dd-mmm" 'adjust this date format to meet
your needs
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"), 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
Else: Calendar1.Visible = False
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

Adjust the 'Range("A1") line to meet your needs.

NOTE: use of an Event Code will probably make other functions
inoperable (e.g. cut/copy/paste, Undo, etc.). This is a trade off you
need to accept if you really want this tool.

Good Luck


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=483870

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
possible to merge a calender with speadsheet leungjac Excel Discussion (Misc queries) 0 September 1st 05 08:19 PM
how do I print 12 month calender in one sheet kumaratfl Excel Discussion (Misc queries) 1 August 19th 05 04:27 PM
How do I set up persian calender on office documents Mahmoodreza Excel Discussion (Misc queries) 0 July 11th 05 11:14 AM
Exel Calender drop down box 2005 Allen Excel Discussion (Misc queries) 1 January 23rd 05 03:54 PM
Determining Dates Within A Calender Mark Excel Worksheet Functions 0 November 8th 04 06:41 AM


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