![]() |
|
||||||||
| Site Links |
| Consulting |
| Knowledge Base |
| Training |
| Forum |
| Articles |
| Resources |
| Products |
| Cool Tools |
| Contact |
| About Us |
| Go to Page... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
|
Worksheet_calculate runs based on every formula in sheet
I am trying to hide several rows whenever the option button "no" is checked in a groupbox in a spreadsheet. I could not get any code to run when the option buttons were checked, so I set the cell link to R27 and then put into R26 the formula =R27. This seems to work with the code below, but the spreadsheet is constantly updating, with lots of spinning cursors and eventual freezing. Is there a simple fix, or a more direct method than my workaround?
Thanks! AIDSNGO VBA:
VBA tags courtesy of www.thecodenet.com
|
|
Local Time: 09:12 PM
Local Date: 06-17-2013 Location:
|
|
|
|
#2 |
|
|
Are these activeX optionbuttons, or the other kind?
Excel Version? If they're activeX then in design mode if you double click one it'll take you to it's click event code. Change it from the likes of: Private Sub OptionButton1_Click() to: VBA:
VBA tags courtesy of www.thecodenet.com
If the option buttons are of the other type then if you right-click it you get the opportunity to assign a macro. Presumably you also have another option button to switch the other way. Both these option buttons need to assigned to the same macro which should be like: VBA:
VBA tags courtesy of www.thecodenet.com
You don't need to link any cells, nor any calculate_event code. p45cal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you. ![]() |
|
Local Time: 05:12 AM
Local Date: 06-18-2013 |
|
|
|
#3 |
|
|
If the groupbox contains 2 optionbuttons (yes & No) you'd better use a checkbox:
VBA:
VBA tags courtesy of www.thecodenet.com
|
|
Local Time: 07:12 AM
Local Date: 06-18-2013 |
|
|
|
#4 |
|
Distinguished Lord of VBAX
|
You don't need Entirerow when you use the Rows object, Rows is the entirerow
____________________________________________ Nihil simul inventum est et perfectum Abusus non tollit usum Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen! James Thurber |
|
Local Time: 06:12 AM
Local Date: 06-18-2013 Location:
|
|
![]() |
| Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|


