Yes
' Module: Sheet1 (ONE) Class Module
Option Explicit
Private Sub CommandButton1_Click()
sShowSheet "TWO"
End Sub
Private Sub CommandButton6_Click()
sShowSheet "FIVE"
End Sub
Ensure you are in Design Mode then click on the button to select it. Change the name from CommandButton1 to CommandButton6 in order to differentiate it. Then use the code above. The module for selecting and hiding sheets doesn't change. In reality, each sheet can have CommandButton1 and CommandButton2 but, personally, I think that can be confusing and could mean you'd change the code in the wrong subroutine. But, personal taste.
If you want to do the same as the Next button, but in reverse, wouldn't that mean it's a Previous button, rather than Last button?
It's common to see First, Next, Previous and Last for navigation. First would be disabled (greyed out or not visible) on the first sheet. Similarly the Last button.
Regards, TMS
Bookmarks