How to activate the button

  • Thread starter Thread starter junx13
  • Start date Start date
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
 
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.
|
|
| ---
| Message posted
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top