Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Combining names

I have 8 checkboxes and a variable BoxNo with a number
from 1-8.

I want to be able to make the statement:

If CheckBox6 = True

but by using the variable to determine the name of the
checkbox.

Something like 'If CheckBox & BoxNo = True
but something that actually works

Thanks for the help,
Thomas
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Combining names

Private Sub CommandButton1_Click()
Dim i As Integer

i = 1
If Controls("CheckBox" & i).Value = True Then
MsgBox "checked"
Else
MsgBox "unchecked"
End If
End Sub

"Thomas" wrote in message
...
I have 8 checkboxes and a variable BoxNo with a number
from 1-8.

I want to be able to make the statement:

If CheckBox6 = True

but by using the variable to determine the name of the
checkbox.

Something like 'If CheckBox & BoxNo = True
but something that actually works

Thanks for the help,
Thomas



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
Matching names and combining worksheets Irma A Excel Discussion (Misc queries) 5 April 2nd 09 08:22 PM
Combining first and last names into one column Virginia Excel Worksheet Functions 1 March 11th 08 07:14 PM
Combining first and last names Lewis Shanks Setting up and Configuration of Excel 1 December 15th 04 12:27 AM
Combining Defined Names to New Name For Validation TheSpankster22 Excel Worksheet Functions 1 November 8th 04 09:20 AM
Combining Defined Names to New Name For Validation TheSpankster22 Excel Worksheet Functions 0 November 4th 04 01:28 AM


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