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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default 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
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
How do I: If Pie Section Label = X, Make Pie Section Color = Y MikeZz Excel Programming 2 September 3rd 08 08:35 PM
Hide zero values in a PivotTable report KC Excel Discussion (Misc queries) 1 September 25th 06 09:32 PM
Hide zero totals in pivot table report les8 Excel Discussion (Misc queries) 3 March 23rd 06 12:22 AM
Pivot report - Hide Sums equal to zero Anette Excel Discussion (Misc queries) 2 February 21st 06 08:55 AM
how to hide section of worksheet based on a condition (e.g. tick . kitepuppet Excel Discussion (Misc queries) 2 March 4th 05 06:30 PM


All times are GMT +1. The time now is 03:54 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"