ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   calendar (https://www.excelbanter.com/excel-programming/371827-calendar.html)

gall

calendar
 
Is there a way that when I click in a cell a calendar appears next to the
cell and the user can then click/select a date. The calendar closes and the
date that was selected is now in the cell???

Thanks in advance!!!
Tricia Gall

Jim Thomlinson

calendar
 
Here is one way. Select Tools - Customize - Toolbars - Control Toolbox. A
new toolbar will be added to your Excel. The final button in the bar looks
like a wrench and Hammer. Click this button and from the list of controls
select Calendar Control ?.? You will now get a cross hair cursor. Use this to
drop a calendar control onto your spreadsheet (just below the cell where you
want the date). This will embed the calendar in your sheet. The first button
on the Control Toolbox looks like a ruler and pencil. Click this to exit
design mode. Right click the tab and select view code. Add this code to the
code window. This code shows the calendar when cell A1 is selected.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then 'Change this
Calendar1.Visible = True
Else
Calendar1.Visible = False
End If
End Sub
--
HTH...

Jim Thomlinson


"gall" wrote:

Is there a way that when I click in a cell a calendar appears next to the
cell and the user can then click/select a date. The calendar closes and the
date that was selected is now in the cell???

Thanks in advance!!!
Tricia Gall


gall

calendar
 
This works great!!! Now is there a way that when I click a day in the
calendar it then appears in the cell??

Thanks!!!!!!!!!
Tricia Gall

"Jim Thomlinson" wrote:

Here is one way. Select Tools - Customize - Toolbars - Control Toolbox. A
new toolbar will be added to your Excel. The final button in the bar looks
like a wrench and Hammer. Click this button and from the list of controls
select Calendar Control ?.? You will now get a cross hair cursor. Use this to
drop a calendar control onto your spreadsheet (just below the cell where you
want the date). This will embed the calendar in your sheet. The first button
on the Control Toolbox looks like a ruler and pencil. Click this to exit
design mode. Right click the tab and select view code. Add this code to the
code window. This code shows the calendar when cell A1 is selected.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then 'Change this
Calendar1.Visible = True
Else
Calendar1.Visible = False
End If
End Sub
--
HTH...

Jim Thomlinson


"gall" wrote:

Is there a way that when I click in a cell a calendar appears next to the
cell and the user can then click/select a date. The calendar closes and the
date that was selected is now in the cell???

Thanks in advance!!!
Tricia Gall


Jim Thomlinson

calendar
 
Now that you mention it I should have probably described that part. :-)...
Click on the Design button (ruler and pencil) to get back into design mode.
Now right click on the calendar and select Properties. A dialog window will
open and one of the items will be Linked Cell. Beside that add A1 or whatever
cell you want to link to. Exit out of the dialog and then exit desing mode
and Tada...
--
HTH...

Jim Thomlinson


"gall" wrote:

This works great!!! Now is there a way that when I click a day in the
calendar it then appears in the cell??

Thanks!!!!!!!!!
Tricia Gall

"Jim Thomlinson" wrote:

Here is one way. Select Tools - Customize - Toolbars - Control Toolbox. A
new toolbar will be added to your Excel. The final button in the bar looks
like a wrench and Hammer. Click this button and from the list of controls
select Calendar Control ?.? You will now get a cross hair cursor. Use this to
drop a calendar control onto your spreadsheet (just below the cell where you
want the date). This will embed the calendar in your sheet. The first button
on the Control Toolbox looks like a ruler and pencil. Click this to exit
design mode. Right click the tab and select view code. Add this code to the
code window. This code shows the calendar when cell A1 is selected.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then 'Change this
Calendar1.Visible = True
Else
Calendar1.Visible = False
End If
End Sub
--
HTH...

Jim Thomlinson


"gall" wrote:

Is there a way that when I click in a cell a calendar appears next to the
cell and the user can then click/select a date. The calendar closes and the
date that was selected is now in the cell???

Thanks in advance!!!
Tricia Gall


gall

calendar
 
Got it!! Thanks!!!!

"Jim Thomlinson" wrote:

Now that you mention it I should have probably described that part. :-)...
Click on the Design button (ruler and pencil) to get back into design mode.
Now right click on the calendar and select Properties. A dialog window will
open and one of the items will be Linked Cell. Beside that add A1 or whatever
cell you want to link to. Exit out of the dialog and then exit desing mode
and Tada...
--
HTH...

Jim Thomlinson


"gall" wrote:

This works great!!! Now is there a way that when I click a day in the
calendar it then appears in the cell??

Thanks!!!!!!!!!
Tricia Gall

"Jim Thomlinson" wrote:

Here is one way. Select Tools - Customize - Toolbars - Control Toolbox. A
new toolbar will be added to your Excel. The final button in the bar looks
like a wrench and Hammer. Click this button and from the list of controls
select Calendar Control ?.? You will now get a cross hair cursor. Use this to
drop a calendar control onto your spreadsheet (just below the cell where you
want the date). This will embed the calendar in your sheet. The first button
on the Control Toolbox looks like a ruler and pencil. Click this to exit
design mode. Right click the tab and select view code. Add this code to the
code window. This code shows the calendar when cell A1 is selected.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then 'Change this
Calendar1.Visible = True
Else
Calendar1.Visible = False
End If
End Sub
--
HTH...

Jim Thomlinson


"gall" wrote:

Is there a way that when I click in a cell a calendar appears next to the
cell and the user can then click/select a date. The calendar closes and the
date that was selected is now in the cell???

Thanks in advance!!!
Tricia Gall



All times are GMT +1. The time now is 02:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com