Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel pivot tables - specific expand/collapse buttons visibility MichaƂ Lenartowicz Excel Discussion (Misc queries) 1 October 19th 09 09:48 AM
Limit Visibility of a worksheet Tdahlman Excel Discussion (Misc queries) 1 March 12th 08 04:13 PM
Excel VBA: Problem with copying an embedded chart from one worksheet to another Flystar[_13_] Excel Programming 2 May 21st 04 01:13 AM
Command Button Visibility Problem Ian[_9_] Excel Programming 2 February 20th 04 06:51 PM
Embedded option buttons Jerett Excel Programming 0 December 31st 03 04:04 PM


All times are GMT +1. The time now is 09:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"