calendar control-how to select a date n go to dated sheet

gregfibersoft

New Member
Joined
Jun 5, 2007
Messages
5
Hello all, i am still working on the schedule book. I have a workbook in which all the sheetnames are dates such as Mon 11 Aug. I have a sheet made for every day of the year.

I want to embed a calendar control on all the sheets and be able to click on a date on the control and have it go to the sheet that matches that date.

Any help would be greatly appreciated!!!!! :(
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

venkat1926

Well-known Member
Joined
Aug 21, 2005
Messages
4,824
try this macro . by the by 11 Aug 2007 is Saturday so your sheet should be named "sat 11 Aug". if it is some other year when 11 Aug is Monday it is ok
the macro is to be parked in each of the sheets as event code (rightlick sheet tab and click view code and copy macro.
perhaps better solution may be available.

Code:
Private Sub Calendar1_Click()
Dim x
x = Calendar1.Value
'MsgBox x
Range("a1") = x
Dim y As String
y = WorksheetFunction.Text(x, "ddd dd mmm")
MsgBox y
Worksheets(y).Activate
End Sub
 
Upvote 0

Forum statistics

Threads
1,190,677
Messages
5,982,214
Members
439,769
Latest member
trungminh2802

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top