View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
L Mehl L Mehl is offline
external usenet poster
 
Posts: 73
Default want all worksheet tabs visible, starting at left

Simon --

Thanks for responding.

Using my worksheet names, your suggested code becomes:

If your "Sheet1" represents my "MainMenu" (contains the form requiring user
click of a button),
Sheets("Sheet1").Select
opens "MainMenu", which, in turn, waits for user input, so that the
remaining lines of code don't execute.

ActiveWindow.ScrollWorkbookTabs Position:=xlLast
scrolls the set of worksheet tabs to the right

Sheets(Array( _ ... highlights all the worksheet tabe

If I eliminate
Sheets("Sheet1").Select

the code
opens "MainMenu", which, in turn, waits for user input
If I click cmdCancel on that form,I get the result I want ... MainMenu tab
appearing at the left.

Is there a way in code to "click" a button on the form on the active sheet?

Larry

"Simon Lloyd " wrote in message
...
Sheets("Sheet1").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets(Array("Sheet1", "sheet2", "sheet3", "sheet 4", _
"sheet5", "sheet6", "sheet7")).Select
Sheets("sheet1").Activate

This selects all sheets (1-7)

dont know if this is what you want but its half way there.

Simon


---
Message posted from http://www.ExcelForum.com/