Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visibility Problem of Embedded Buttons in Worksheet
I'm not sure if you're experiencing a display problem or a problem in your
algorithm. You may want to post your code to get a good response. Anson wrote: I am using the Excel 97 and have been trying to solve this problem for weeks. Wonder if anyone can help me on this: I have embedded 5 command buttons, 3 combo boxes and 6 options buttons (3 groups) directly on one of the sheet in an Excel workbook. I have programmed it so that the combo boxes, options buttons and 2 of the command buttons to be invisible unless one button is clicked. When I click on another button (cancel), they should be invisible again. However, when I run the program, one combo box and 2 option butons are always visible and some command buttons are not visible when they should. I have checked the codes and also the grouping of the option buttons and they all make sense. I tried the same codes but replaced "Visible" with "Enabled" and they worked! Why can I enable and disable them but can't hide and unhide them? Are there anything I should be aware of when I set the visibility of the objects on the worksheets? -- Dave Peterson |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visibility Problem of Embedded Buttons in Worksheet
Thanks, though I doubt that's because of the codes since I tried to set visible to false manually and it still wouldn't work. Here are my codes
Private Sub SortReset( Application.EnableEvents = Fals Application.ScreenUpdating = Fals tbSort.Caption = "Sort btnExtract.Visible = Tru btnConsolidate.Visible = Tru cBox1.Visible = False: cBox2.Visible = False: cBox3.Visible = Fals cBox1.Value = Empty: cBox2.Value = Empty: cBox3.Value = Empt cBox1.Clear: cBox2.Clear: cBox3.Clea obSort1A = 0: obSort3A = 0: obSort3A = obSort1D = 0: obSort3D = 0: obSort3D = obSort1A.Visible = False: obSort2A.Visible = False: obSort3A.Visible = Fals obSort1D.Visible = False: obSort2D.Visible = False: obSort3D.Visible = Fals obSort1A.Caption = "": obSort2A.Caption = "": obSort3A.Caption = " obSort1D.Caption = "": obSort2D.Caption = "": obSort3D.Caption = " obSort1A = 1: obSort2A = 1: obSort3A = btnSortExec.Visible = Fals Application.EnableEvents = Tru Application.ScreenUpdating = Tru tbSort.Value = Fals End Su ----- Dave Peterson wrote: ---- I'm not sure if you're experiencing a display problem or a problem in you algorithm You may want to post your code to get a good response Anson wrote I am using the Excel 97 and have been trying to solve this problem for weeks. Wonder if anyone can help me on this I have embedded 5 command buttons, 3 combo boxes and 6 options buttons (3 groups) directly on one of the sheet in an Excel workbook. I have programmed it so that the combo boxes, options buttons and 2 of the command buttons to be invisible unless one button is clicked. When I click on another button (cancel), they should be invisible again. However, when I run the program, one combo box and 2 option butons are always visible and some command buttons are not visible when they should. I have checked the codes and also the grouping of the option buttons and they all make sense. I tried the same codes but replaced "Visible" with "Enabled" and they worked! Why can I enable and disable them but can't hide and unhide them? Are there anything I should be aware of when I set the visibility of the objects on the worksheets -- Dave Peterso |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visibility Problem of Embedded Buttons in Worksheet
You've got your ScreenUpdating turned off at the beginning, which is
surely going to prevent the changes from appearing. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Anson wrote: Thanks, though I doubt that's because of the codes since I tried to set visible to false manually and it still wouldn't work. Here are my codes: Private Sub SortReset() Application.EnableEvents = False Application.ScreenUpdating = False tbSort.Caption = "Sort" btnExtract.Visible = True btnConsolidate.Visible = True cBox1.Visible = False: cBox2.Visible = False: cBox3.Visible = False cBox1.Value = Empty: cBox2.Value = Empty: cBox3.Value = Empty cBox1.Clear: cBox2.Clear: cBox3.Clear obSort1A = 0: obSort3A = 0: obSort3A = 0 obSort1D = 0: obSort3D = 0: obSort3D = 0 obSort1A.Visible = False: obSort2A.Visible = False: obSort3A.Visible = False obSort1D.Visible = False: obSort2D.Visible = False: obSort3D.Visible = False obSort1A.Caption = "": obSort2A.Caption = "": obSort3A.Caption = "" obSort1D.Caption = "": obSort2D.Caption = "": obSort3D.Caption = "" obSort1A = 1: obSort2A = 1: obSort3A = 1 btnSortExec.Visible = False Application.EnableEvents = True Application.ScreenUpdating = True tbSort.Value = False End Sub ----- Dave Peterson wrote: ----- I'm not sure if you're experiencing a display problem or a problem in your algorithm. You may want to post your code to get a good response. Anson wrote: I am using the Excel 97 and have been trying to solve this problem for weeks. Wonder if anyone can help me on this: I have embedded 5 command buttons, 3 combo boxes and 6 options buttons (3 groups) directly on one of the sheet in an Excel workbook. I have programmed it so that the combo boxes, options buttons and 2 of the command buttons to be invisible unless one button is clicked. When I click on another button (cancel), they should be invisible again. However, when I run the program, one combo box and 2 option butons are always visible and some command buttons are not visible when they should. I have checked the codes and also the grouping of the option buttons and they all make sense. I tried the same codes but replaced "Visible" with "Enabled" and they worked! Why can I enable and disable them but can't hide and unhide them? Are there anything I should be aware of when I set the visibility of the objects on the worksheets? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel pivot tables - specific expand/collapse buttons visibility | Excel Discussion (Misc queries) | |||
Limit Visibility of a worksheet | Excel Discussion (Misc queries) | |||
Excel VBA: Problem with copying an embedded chart from one worksheet to another | Excel Programming | |||
Command Button Visibility Problem | Excel Programming | |||
Embedded option buttons | Excel Programming |