Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Ella,
I like to supply a default when using InputBox, so that you don't have to necessarily type in anything, in this case a sheetname. Sub specifysheetname() Dim response As String response = Application.Worksheets(1).Name response = Application.InputBox( _ "Enter the sheetname", _ "Enter sheetname:", response, , , , 1) If response < "False" Then On Error Resume Next Application.Worksheets(response).Activate If Err.Number = 9 Then MsgBox "no such sheet" On Error GoTo 0 End If End Sub Are you aware that you right click a sheet navigation arrow left of the sheetnames and select a sheet or "more sheets". Or a dialog to directly bring up more sheets. http://www.mvps.org/dmcritchie/excel...htm#moresheets Sooner or later if you have a lot of sheets you will want to sort the worksheet tabs. http://www.mvps.org/dmcritchie/excel...#sortallsheets --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Ella" wrote in message oups.com... I want to create a macro that creates a pop up box that ask the name of the worksheet i want to open. What statement do i use? please help : |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
this is probably very basic | Excel Discussion (Misc queries) | |||
Basic If | Excel Worksheet Functions | |||
DV basic help | New Users to Excel | |||
Need some basic help | Excel Programming | |||
probably 2 basic | Excel Programming |