LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default Checking Options in UserForms Collection

Hi;

The user form, frmOptSelect, has a number of frames, each with a number of
option controls. The algoritms for all combinations of options are not
currently available, so I'm disabling certain options for now.
I'm trying to make sure that an option is selected in each frame on the form
before I click the btnOpen button. In:

Private Sub btnOpen_Click () event procedure and right at the top, I
inserted:
........ CheckOptions
which is a regular macro:

Sub CheckOptions()
Dim myOption As Control
Dim myFlag As Integer
.................................................. ....
' check options in frame grpSeries
For Each myOption In UserForms(1).grpSeries.Controls
......If myOption.Value = True Then myFlag = 1
Next myOption
If myFlage < 1 Then MsgBox "Select B- or GEL-Series"
.................................................. .....
' repeat for all frames
.................................................. .....

I got " Run-time error '9': Subscript out of range", and the above For Each
statement is higlighted!

Any suggestions ? Thank you
 
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
ProtectSheet Options are un-checking after macro Roady Excel Discussion (Misc queries) 9 November 16th 11 04:19 PM
SumProduct - checking for multiple options in one column edeaston Excel Discussion (Misc queries) 2 January 30th 09 04:56 PM
Are Error-Checking rules (in Excel Options) workbook-specific? JoeM Excel Discussion (Misc queries) 7 May 4th 08 01:30 AM
Error Checking Options - 2000-2003 brianbishop Excel Discussion (Misc queries) 1 August 11th 06 09:33 PM
spell checking options dvs_47 Excel Worksheet Functions 2 March 6th 06 09:16 PM


All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"