I've used a simple macro and application.onkey to make it so that I only have to press Page Up or Page Down to scroll through my excel tabs.
My only problem is that I don't know how to identify the first and last tab in VBA ( I get an error message if I try to scroll past the first or last tab).
Thanks in advance for the help!
I've used a simple macro and...(oops, I forgot to post it)![]()
---
Ben Van Johnson
Here's my attempt, it works but it's not pretty.
Sub Tab_Scroll_Up()
Dim x As Variant
x = Worksheets(1).Name
If ActiveSheet.Name = x Then
ActiveSheet.Select
Else
ActiveSheet.Previous.Select
End If
End Sub
Sub Tab_Scroll_Down()
Dim x As Variant
Dim y As Variant
x = Worksheets.Count
y = Worksheets(x).Name
If ActiveSheet.Name = y Then
ActiveSheet.Select
Else
ActiveSheet.Next.Select
End If
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks