Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default selecting a worksheet page

I can use the following code on a button on the cover sheet, but how do I
modify it if I want to use it in a form? When I use it it seems to see right
through it and click on the form itself.

Sub ShowSheetList()

On Error Resume Next
If ActiveWorkbook.Sheets.Count <= 16 Then
Application.CommandBars("Workbook Tabs"). _
ShowPopup 500, 225
Else
Application.CommandBars("Workbook Tabs"). _
Controls("More Sheets...").Execute
End If
On Error GoTo 0

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default selecting a worksheet page

It is much more simple to put a new button on the form and then attach the
macro to it. You can then delete the old button.

"Jim T." wrote:

I can use the following code on a button on the cover sheet, but how do I
modify it if I want to use it in a form? When I use it it seems to see right
through it and click on the form itself.

Sub ShowSheetList()

On Error Resume Next
If ActiveWorkbook.Sheets.Count <= 16 Then
Application.CommandBars("Workbook Tabs"). _
ShowPopup 500, 225
Else
Application.CommandBars("Workbook Tabs"). _
Controls("More Sheets...").Execute
End If
On Error GoTo 0

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default selecting a worksheet page

I tried using a new button but when it pops up and I click on a sheet nothing
happens except the pop up window disappears. Any other ideas?

"JLGWhiz" wrote:

It is much more simple to put a new button on the form and then attach the
macro to it. You can then delete the old button.

"Jim T." wrote:

I can use the following code on a button on the cover sheet, but how do I
modify it if I want to use it in a form? When I use it it seems to see right
through it and click on the form itself.

Sub ShowSheetList()

On Error Resume Next
If ActiveWorkbook.Sheets.Count <= 16 Then
Application.CommandBars("Workbook Tabs"). _
ShowPopup 500, 225
Else
Application.CommandBars("Workbook Tabs"). _
Controls("More Sheets...").Execute
End If
On Error GoTo 0

End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting Page Tabs Millington Excel Discussion (Misc queries) 2 August 29th 07 08:24 PM
selecting 2 ranges, 1 Worksheet, printing on 1 page PDF need help please Excel Discussion (Misc queries) 0 October 17th 06 09:03 PM
Converting a muliple page worksheet to a single page worksheet [email protected] Excel Discussion (Misc queries) 2 June 30th 05 09:40 PM
Page Setup not selecting Josh O. Excel Programming 3 May 24th 05 06:53 PM
Selecting a Page in Page Break Preview Mark Worthington Excel Programming 2 February 12th 04 07:48 PM


All times are GMT +1. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"