Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide control until report section populates
Greetings all. I have a command button, Button10, that clears out a range.
The range to be cleared is populated by a solver macro, and I don't want the clear button to be visible until the range is populated with the results of the solver bit. Then, once the range is cleared, I want the button to be invisible again. Thanks for any suggestions. Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide control until report section populates
Identify a cell in the range which will not be blank when data is populated
by the solver macro. Suppose the cell is C8; try the below. Select the sheet tab which you want to work with. Right click the sheet tab and click on 'View Code'. This will launch VBE. Paste the below code to the right blank portion. Get back to to workbook and try out. Private Sub CommandButton10_Click() Range("C8").ClearContents End Sub Private Sub Worksheet_Change(ByVal Target As Range) CommandButton10.Visible = Not (Range("C8") = "") End Sub If this post helps click Yes --------------- Jacob Skaria "Greg Snidow" wrote: Greetings all. I have a command button, Button10, that clears out a range. The range to be cleared is populated by a solver macro, and I don't want the clear button to be visible until the range is populated with the results of the solver bit. Then, once the range is cleared, I want the button to be invisible again. Thanks for any suggestions. Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide control until report section populates
Thanks Jacob, but it does not like that. I guess I am thinking in Access,
where I would just do 'Me.Button10.visible = false' as the last line in the buttons code. This brings me to another question. How can I see the properties of the button? I added it from the developer toolbar, but I can't figure out how to, say for example, change the button name? "Jacob Skaria" wrote: Identify a cell in the range which will not be blank when data is populated by the solver macro. Suppose the cell is C8; try the below. Select the sheet tab which you want to work with. Right click the sheet tab and click on 'View Code'. This will launch VBE. Paste the below code to the right blank portion. Get back to to workbook and try out. Private Sub CommandButton10_Click() Range("C8").ClearContents End Sub Private Sub Worksheet_Change(ByVal Target As Range) CommandButton10.Visible = Not (Range("C8") = "") End Sub If this post helps click Yes --------------- Jacob Skaria "Greg Snidow" wrote: Greetings all. I have a command button, Button10, that clears out a range. The range to be cleared is populated by a solver macro, and I don't want the clear button to be visible until the range is populated with the results of the solver bit. Then, once the range is cleared, I want the button to be invisible again. Thanks for any suggestions. Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I: If Pie Section Label = X, Make Pie Section Color = Y | Excel Programming | |||
Hide zero values in a PivotTable report | Excel Discussion (Misc queries) | |||
Hide zero totals in pivot table report | Excel Discussion (Misc queries) | |||
Pivot report - Hide Sums equal to zero | Excel Discussion (Misc queries) | |||
how to hide section of worksheet based on a condition (e.g. tick . | Excel Discussion (Misc queries) |