Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default put a calendar on an excel sheet

Hello,
I want a cell to be a calendar so that when I click on it or its small
arrow, a calendar appears and select the date I want. Is it an activex? if
yes, can anyone provide me with a good one?
thanx alot


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default put a calendar on an excel sheet

You need VBA to do this

Do Insert-Object from the menubar and place a calendar control on your
sheet.
It is possible you don't see it in the list, it is installed with Access.
So if you don't have that you possible don't have the control

Here a example to use

Place this in a Sheetmodule
If you select a cell in Column A the calendar will popup and when
you DblClick on the calendar the date will be placed in the activecell

Private Sub Calendar1_DblClick()
ActiveCell.NumberFormat = "m/d/yyyy"
ActiveCell = Calendar1
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else: Calendar1.Visible = False
End If
End Sub


Example for one cell

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
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
Else: Calendar1.Visible = False
End If
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"M K W" wrote in message ...
Hello,
I want a cell to be a calendar so that when I click on it or its small
arrow, a calendar appears and select the date I want. Is it an activex? if
yes, can anyone provide me with a good one?
thanx alot




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default put a calendar on an excel sheet

Thank you very much Ron de Bruin, I really appreciate that.


"Ron de Bruin" wrote in message
...
You need VBA to do this

Do Insert-Object from the menubar and place a calendar control on your
sheet.
It is possible you don't see it in the list, it is installed with Access.
So if you don't have that you possible don't have the control

Here a example to use

Place this in a Sheetmodule
If you select a cell in Column A the calendar will popup and when
you DblClick on the calendar the date will be placed in the activecell

Private Sub Calendar1_DblClick()
ActiveCell.NumberFormat = "m/d/yyyy"
ActiveCell = Calendar1
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else: Calendar1.Visible = False
End If
End Sub


Example for one cell

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
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
Else: Calendar1.Visible = False
End If
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"M K W" wrote in message

...
Hello,
I want a cell to be a calendar so that when I click on it or its small
arrow, a calendar appears and select the date I want. Is it an activex?

if
yes, can anyone provide me with a good one?
thanx alot






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default put a calendar on an excel sheet

Hi,

Look for "Excel popup Calendar" at this site:
http://cpap.com.br/orlando

To calendar popup when a certain cell and certain sheet is
selected try this:
- Open your workbook
- On worksheet tab, at bottom Excel window, right click the sheet of your
target range;
- At popup menu click View code;
- Insert the code below that popup calculator when A1 cell is selected and
ExcelCalendar.xla is load;

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub
Application.Run "ExcelCalendar.xla!Calendar"
End Sub

HTH

---

(So that you get best and rapid solution and all may benefit from the
discussion, please reply within the newsgroup, not in email)


"M K W" escreveu na mensagem
...
Hello,
I want a cell to be a calendar so that when I click on it or its small
arrow, a calendar appears and select the date I want. Is it an activex? if
yes, can anyone provide me with a good one?
thanx alot




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
download a template excel Calendar into a work sheet? Carl R[_2_] Excel Discussion (Misc queries) 1 January 26th 10 10:56 PM
how do i export excel calendar info to outlook calendar? Maggie Excel Discussion (Misc queries) 1 December 31st 07 10:27 PM
A Microsoft Excel recall spread sheet using calendar dates. rockconner07 Excel Worksheet Functions 4 September 12th 07 02:40 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 06:21 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"