oakley 0226
New Member
- Joined
- Jan 28, 2024
- Messages
- 8
- Office Version
- 365
- 2019
- Platform
- Windows
I am having an issue with a command I am using,
I have a bunch of command buttons on my main sheet to unhide one single specified sheet each however they don't always work. The goal of this button is to simply unhide the tab the sheet it referring to, but not go to that sheet yet...
Some times some of them will work in 1 click, sometimes it will finally work after 3 or 4 clicks, and sometimes not at all. It seems random when they work and when they dont.
They will almost always work if I click it once and then push the space bar.
Is there a problem with my formula? or is there a way to tell automatically execute a space bar push afterwards? or to get it to always execute the command? any ideas? (side note, I tried changing to "True" to "xlSheetVisible") which didn't seem to help.
Private Sub CommandButton3_Click()
ActiveWorkbook.Worksheets("Sheet 30").Visible = True
End Sub
note, I also have the below command buttons for unhiding and going to the indicated worksheet, and these buttons always work fine.
Private Sub CommandButton4_Click()
ActiveWorkbook.Worksheets("Sheet 30").Visible = True
ActiveWorkbook.Worksheets("Sheet 30").Select
End Sub
Thanks!
I have a bunch of command buttons on my main sheet to unhide one single specified sheet each however they don't always work. The goal of this button is to simply unhide the tab the sheet it referring to, but not go to that sheet yet...
Some times some of them will work in 1 click, sometimes it will finally work after 3 or 4 clicks, and sometimes not at all. It seems random when they work and when they dont.
They will almost always work if I click it once and then push the space bar.
Is there a problem with my formula? or is there a way to tell automatically execute a space bar push afterwards? or to get it to always execute the command? any ideas? (side note, I tried changing to "True" to "xlSheetVisible") which didn't seem to help.
Private Sub CommandButton3_Click()
ActiveWorkbook.Worksheets("Sheet 30").Visible = True
End Sub
note, I also have the below command buttons for unhiding and going to the indicated worksheet, and these buttons always work fine.
Private Sub CommandButton4_Click()
ActiveWorkbook.Worksheets("Sheet 30").Visible = True
ActiveWorkbook.Worksheets("Sheet 30").Select
End Sub
Thanks!