• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Reach at destination sheet on the basis of toda'y name sheet in multiple sheet

Ravindra

Member
Dear All,

Again I'm here to make my excel sheet more featured.I want to add a logic from VB in excel to make my sheet more flexiable.


I have 5 sheets and sheet name are 1,2,3,4,5(Name the sheets as 1, 2, 3, 4, 5)

Now I want to add a button in each page. Now suppose today date is 27 as already I've named all sheet according date i.e,1,2,3...31 and suppose I'm in sheet no. 5 so I soon want to reach sheet no. at 27 for this purpose how to implement button in all sheets.

Note:- User will reach at destination sheet on click event of button on the basis of today's date.


Please give me step by step proper solution.


Thanks and Regards

Ravindra Bisht
 
Hi

Use this code and attach it to a button on every sheet.


Sub SelectSheetFromDate()

Dim i As String

i = Application.WorksheetFunction.Text(Day(Now()), "0")

Sheets(i).Select

End Sub


cheers


kanti
 
Dear All,


As per my posts I needed solution for reaching at sheet's named 1,2,3..31(shows date of assignemnt) and I added another sheet named summary in which user need to fill date and on the basis of filled date in that cell(A2) record will be fetched from choosen date sheet.

Finally I got solution for that was - =INDIRECT("'"&A2&"'!"&"I2")

However it works fine, but now my requrienment is to make more flexiable to my sheet.

So, I want to use cell(A2) as hyperlink also and if I click on that then automatically it opens specific sheet.

Suppose, I filled 10/01/2012 date in cell(A2) in summary sheet and I want to open sheet named 1 then what funcanilty should be used such that it can works for both first for passing sheet no . in =INDIRECT("'"&A2&"'!"&"I2") and being hyperlink for selected sheet.


Please give me better assumption.


Thanks and Regards,

Ravindra Bisht
 
Back
Top