View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default 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