Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » excel-training-course - Excel code
excel-training-course - Excel code
Resolved · Low Priority · Version Standard
Excel code
What formula would I use to hide multiple objects more than ten), on a worksheet using a command button or an option button, and make them re-appear immediately instead of cascading.For upcoming training course dates see: Pricing & availability
RE: Excel code
Hi Robert,Thanks for your question. But could you elaborate a bit further? There is no Excel function/formula for hiding objects.
Can you tell me what are you trying to create, e.g. a userform?
Regards,
Katie Woo
Microsoft Certified Trainer
RE: Excel code
Katie,What I am trying to do is create a worksheet with multiple objects on it. When the worksheet is activated only selected buttons are visible and enabled or bisible and unabled. When a command button is selected other command buttons and option buttons become enabled and visible. What I need is for theses objects to appear all at once and when a second command button is selected the original objects return to their original state of not being visible or enabled.
I have created an Array statement which appears to work but still involves a lot of code.
RE: Excel code
Hi RobetOn the Worlsheets Activate Event you make the required buttons or other objects visible and all other buttons invisible. eg:
Private Sub Worksheet_Activate()
cmdButton1.Visible = True
cmdButton2.Visible = True
cmdButton3.Visible = False
optOption1.Visible = True
optOption2.Visible = False
End Sub
The above open the worksheet and shows only buttons 1 and 2.
The code below makes the second Opotion box visible andhides the secons button:
Private Sub optOption1_Click()
cmdButton1.Visible = True
cmdButton2.Visible = False
cmdButton3.Visible = False
optOption1.Visible = True
optOption2.Visible = True
End Sub
Hope this helps
Carlos
|
|
» Forum post: Dependency Linking |



Course updates

