Archive of Mr Excel Message Board


Back to Controls in Excel archive index
Back to archive home

Option Buttons

Posted by Robin on May 25, 2001 8:21 AM
I have inserted two pairs of option buttons and would like them to operate independently. When I change the cell link for the first pair, the link for the other pair is changed as well. Is there a way (without having to do this via VBA) to remedy this?

Thanks,
R


Figured it out

Posted by Robin on May 25, 2001 8:26 AM
In case anyone else is interested, the solution is to group each pair in a frame.

R


NEW TOPIC--COUNTER

Posted by Tom on May 25, 2001 11:37 AM
How do i count the number of rows after i do an advanced filter?? i have a huge report with several filters and new to know how many rows show up after each filter runs.

ps..my "post a message" wouldnt work so i used this.


Re: Figured it out

Posted by Dave Hawley on May 25, 2001 5:35 PM


Hi Robin

If you use the OptionButtons from the "Control Toolbox" you could change the "GroupName" Property of each OptionButton to a different name.

Dave

OzGrid Business Applications


Re: NEW TOPIC--COUNTER

Posted by Dax on May 26, 2001 9:06 AM

Hello,

When you run an advanced filter Excel tells you how many items matched the criteria in the status bar. However, this disappears if you edit a cell for example. This code will tell you the same. To use it, click Alt+F11 to open the VB Editor, click Insert, Module and then paste the code. You can then run the macro by clicking Alt+F8 and choosing CountFilteredRows. Obviously, this may become a pain after a while so you could include this routine in your personal workbook and assign it to a button or menu option.

Sub CountFilteredRows()
Dim VisibleCellCount As Long

With ActiveCell.CurrentRegion.SpecialCells(xlCellTypeVisible)
VisibleCellCount = (.Count / .Columns.Count) - 1
End With

MsgBox "There are " & VisibleCellCount & _
" items that meet the advanced filter criteria", _
vbInformation, "Filtered Item Count"
End Sub


HTH,
Dax.


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.