Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bert,
Your suggestion seems like a simple, straightforward solution. Thanks In fact the suggestion was made by Dave and, therefore, the thanks are due to him. --- Regards. Norman "Bert" wrote in message news:ZJ7Tj.971$k11.671@trndny08... Your suggestion seems like a simple, straightforward solution. Thanks. "Norman Jones" wrote in message ... Hi Bert, ============= Dave Peterson: I don't know why it's happening, but as an alternative... How about adding all the commandbuttons you need, but hide the ones you don't need until later. I've always found making something visible is a lot easier to do. Interesting suggestion. If I make the buttons invisible, can I resize the Userform to so that I don't have half of it seem empty? ============= As a schematic example. consider: '========= Option Explicit '------------- Private Sub UserForm_Initialize() With Me .Height = 130 .CommandButton1.Visible = False .CommandButton2.Visible = False End With End Sub '------------- Sub CommandButton1_Click() MsgBox "Hi from CommmandButton1" End Sub '------------- Sub CommandButton2_Click() MsgBox "Hi from CommmandButton2" End Sub '------------- Private Sub CommandButton3_Click() With Me .CommandButton1.Visible = True .CommandButton2.Visible = True .Height = .Height + .CommandButton1.Height + 10 End With End Sub '<<========= --- Regards. Norman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trigger or code | Excel Discussion (Misc queries) | |||
How to stop CommandButtons being deleted as pictures in code?? | Excel Programming | |||
Trigger Event Code | Excel Programming | |||
Trigger code | Excel Programming |