View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default VB help required

Hi,

Cute idea, never thought of that. OK, here goes:

1. Choose View, Toolbars, Control Toolbox
2. On the control toolbox click the More Controls button - the last button
3. Scroll the list and find the Calendar10 control (the number will depend
on the version of that happens to be installed on your computer), click the
control and then click in the spreadsheet.
4. Right-click the calendar and choose View Code
5. Modify the subroutine to read

Private Sub Calendar1_Click()
Dim myDay As String
myDay = Me.Calendar1.Day
Sheets(myDay).Select
End Sub

Now return to the spreadsheet and turn off Design Mode on the Control
Toolbox toolbar - the 1st tool

Now to make this work the sheets must be named 1, 2, 3, ...31 just numbers.
If you are using a different naming convention you will need to modify the
code.
--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"adeel via OfficeKB.com" wrote:

I have a work book with 30 sheets (dates), first sheet is manu sheet, i
insert a calender object & a button. i just want that i click any date on
calender then click button and the sheet of selected date should be open.....
may be some vb use....please help

--
Message posted via http://www.officekb.com