How to activate the button

J

junx13

Hi, I have a form button that I managed to hide with this code:

Private Sub Workbook_Open()
Dim ws As Worksheet

For Each ws In ActiveWorkbook.Worksheets

With ws.Buttons(Application.Caller).Visible = False
End With
Next ws


End Sub

Now, I dunno how to ref the button I created to make it unhide.

I will be making it appear in the Worksheet_change event.

The button is a form button called Test
 
J

Jim Rech

Perhaps:

ws.Buttons("Test").Visible = True

--
Jim Rech
Excel MVP
| Hi, I have a form button that I managed to hide with this code:
|
| Private Sub Workbook_Open()
| Dim ws As Worksheet
|
| For Each ws In ActiveWorkbook.Worksheets
|
| With ws.Buttons(Application.Caller).Visible = False
| End With
| Next ws
|
|
| End Sub
|
| Now, I dunno how to ref the button I created to make it unhide.
|
| I will be making it appear in the Worksheet_change event.
|
| The button is a form button called Test.
|
|
| ---
|
|
 
Top