Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variables & strings
I have multiple commandbuttons on a single sheet and I wish to make them all
visible Do I have to list each button as follows, or can I use a string? CommandButton1.Visible = True cheers Tanya |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variables & strings
Assuming that sheet is Sheet1...
Sub MakeCommandButtonsVisible() Dim Obj As Object For Each Obj In Worksheets("Sheet1").OLEObjects Obj.Visible = True Next End Sub If you want to do this to the active sheet instead of a specific sheet, just substitute ActiveSheet for the Worksheets("Sheet1") reference. Rick "Tanya" wrote in message ... I have multiple commandbuttons on a single sheet and I wish to make them all visible Do I have to list each button as follows, or can I use a string? CommandButton1.Visible = True cheers Tanya |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variables & strings
Thank you Rick,
Worked a charm. Regards Tanya "Rick Rothstein (MVP - VB)" wrote: Assuming that sheet is Sheet1... Sub MakeCommandButtonsVisible() Dim Obj As Object For Each Obj In Worksheets("Sheet1").OLEObjects Obj.Visible = True Next End Sub If you want to do this to the active sheet instead of a specific sheet, just substitute ActiveSheet for the Worksheets("Sheet1") reference. Rick "Tanya" wrote in message ... I have multiple commandbuttons on a single sheet and I wish to make them all visible Do I have to list each button as follows, or can I use a string? CommandButton1.Visible = True cheers Tanya |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Variables in Query Strings | Excel Programming | |||
Assigning multiple text strings to variables | Excel Programming | |||
substitute strings with variables | Excel Programming | |||
Complex Text Strings|Variables | Excel Programming | |||
Converting strings to Sum worksheet function and control variables | Excel Programming |