ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to activate the button (https://www.excelbanter.com/excel-programming/301006-how-activate-button.html)

junx13[_3_]

How to activate the button
 
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 from http://www.ExcelForum.com


Jim Rech

How to activate the button
 
Perhaps:

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

--
Jim Rech
Excel MVP
"junx13 " wrote in message
...
| 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 from http://www.ExcelForum.com/
|




All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com