Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Nde Nde is offline
external usenet poster
 
Posts: 16
Default Macro to create a shortcut to make next Worksheet visible

Hello,

I am looking for a macro that will make the worksheet to the right of the
active worksheet visible, thus enhancing the navigatiuon through the excel
workbook. Once the last worksheet on the right is reached the I will start
again at the first one.

Actually I am looking at the same behavior than the Alt + Tab keys
combination in Windows.

Has anyone done this.

Thanks,
nde
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro to create a shortcut to make next Worksheet visible

activesheet.next.Activate

You would have to check that the activesheet is not the last sheet and also
pay attention to hidden sheets.

Also look at the previous command.

--
Regards,
Tom Ogilvy


"nde" wrote:

Hello,

I am looking for a macro that will make the worksheet to the right of the
active worksheet visible, thus enhancing the navigatiuon through the excel
workbook. Once the last worksheet on the right is reached the I will start
again at the first one.

Actually I am looking at the same behavior than the Alt + Tab keys
combination in Windows.

Has anyone done this.

Thanks,
nde

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Macro to create a shortcut to make next Worksheet visible

Ctrl+Page Up or Page Down
That will switch between tabs similar to the way Alt+Tab switches between
windows.


You may also try something like this:

Sub test()
c = ActiveSheet.Index
If c = Sheets.Count _
Then
MsgBox ("You have reached the last sheet.")
End
Else
End If

With Sheets(c + 1)
.Visible = True
.Activate
End With

End Sub


HTH,
Paul

"nde" wrote in message
...
Hello,

I am looking for a macro that will make the worksheet to the right of the
active worksheet visible, thus enhancing the navigatiuon through the excel
workbook. Once the last worksheet on the right is reached the I will start
again at the first one.

Actually I am looking at the same behavior than the Alt + Tab keys
combination in Windows.

Has anyone done this.

Thanks,
nde



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Macro to create a shortcut to make next Worksheet visible

nde,
try something like this

Sub SheetAct()
Dim x As Integer
x = ActiveSheet.Index
Do
If x < Worksheets.Count Then
x = x + 1
Else
x = 1
End If
Loop Until Worksheets(x).Visible = True
Worksheets(x).Activate
End Sub

regards,

DaveU

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
How can I make a drop down box visible within a worksheet? skittles_golf Excel Worksheet Functions 42 April 21st 23 02:59 PM
How to make worksheet saved in VB6 visible? Lamont[_2_] Excel Programming 6 November 10th 06 04:39 PM
better search: "make worksheet visible" christo Excel Discussion (Misc queries) 1 December 1st 04 12:20 AM
How select all pictures in a worksheet and make visible? Gunnar Johansson Excel Programming 5 November 2nd 04 09:50 PM
Macro to make period visible in pivot table Hans Excel Programming 2 June 23rd 04 08:28 AM


All times are GMT +1. The time now is 09:22 AM.

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

About Us

"It's about Microsoft Excel"