View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Scoops
 
Posts: n/a
Default selecting a single sheet from a volume of sheets in a workbook


No News wrote:
Dear Steeve.

For your 1st option:- Since I was not so familier with excel, I do not
know
where to add these codes to each sheet. Can you explain please.


Hi No News

Pasting the code into 100 sheets would be painful itself, so:

Press Alt+F11 to open the vb editor.

Click Insert Module.

Paste the following code into the window that opens:

Sub SheetFind()
Dim mySheet As String

On Error GoTo nosheet
mySheet = InputBox("Please enter the Sheet name to activate", "GoTo
Sheet")
Sheets(mySheet).Activate
Exit Sub

nosheet:
MsgBox ("No sheet with the name " & mySheet & " found")
End Sub


***End of code***

The Input box isn't very elegant but functional.

To run the macro:

From the Excel toolbar click Tools Macro Macros SheetFind.


You might want to investigate placing a custom button on your toolbar
and assigning the macro to it so that it runs with a single click
(right-click a toolbar and Customize...)

Regards

Steve