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: 709
Default Array for clearing checkboxes

I have a number of checkboxes on my page, and when one is ticked, i am using
code to clear the others, and if the subject they relate to isn't relevant, i
hide them.
I have used arrays in the past to clear these in bulk.

Private Sub BlankCheckboxes(which)

'routine to specify whether checkboxes have a null value

Dim i As Long
For i = LBound(which, 1) To UBound(which, 1)
Me.Controls("Checkbox" & which(i)).Value = False
Next i
End Sub

Then:

Private Sub CheckBox1_Click()

If CheckBox1.Value = True Then
BlankCheckboxes Array(2, 3, 4)
End If
End Sub

When i try this i get Compile Error, Method or data member not found.

I know it worked before on another spreadsheet, am i missing something
obvious?

Help appreciated!

Richard

--
Richard
 
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
clearing array contents mark Excel Programming 15 June 8th 05 03:51 PM
Excel VBA array of checkboxes Eliezer Excel Programming 2 September 2nd 04 08:36 PM
Excel VBA Problem - Clearing multiple checkboxes rott[_7_] Excel Programming 2 May 18th 04 09:09 PM
vba clearing out values stored in array chick-racer[_44_] Excel Programming 2 December 1st 03 09:05 PM
setting ctl to array of checkboxes yields type mismatch error. tritan Excel Programming 0 July 11th 03 09:22 PM


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