Hi guys When prohramming, I want to know the sheet number, how could I get it Thanks Mike
M Mike Chen Apr 3, 2004 #1 Hi guys When prohramming, I want to know the sheet number, how could I get it Thanks Mike
S Steve Garman Apr 3, 2004 #2 ActiveSheet.Index will give you the sheet's number, regardless of its name But if you're looking for something like "Sheet1" then you'd be better off withActiveSheet.Name
ActiveSheet.Index will give you the sheet's number, regardless of its name But if you're looking for something like "Sheet1" then you'd be better off withActiveSheet.Name
C Charles Williams Apr 3, 2004 #3 Hi Mike, depends what you mean by sheet number: Dim j as long for j=1 to Worksheets.count msgbox "sheet number " & j & " is named " & worksheets(j).name next j this shows you the sequence number in the worksheets collection: is that what you are looking for? regards Charles ______________________ Decision Models FastExcel Version 2 now available. www.DecisionModels.com/FxlV2WhatsNew.htm
Hi Mike, depends what you mean by sheet number: Dim j as long for j=1 to Worksheets.count msgbox "sheet number " & j & " is named " & worksheets(j).name next j this shows you the sequence number in the worksheets collection: is that what you are looking for? regards Charles ______________________ Decision Models FastExcel Version 2 now available. www.DecisionModels.com/FxlV2WhatsNew.htm