Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Referencing Checkbox Name

I was wondering how I could reference the name of a checkbox and assign it to
the value of a cell.

To give an example of what I am looking for:

I have 5 checkboxes on a sheet and the names of these checkboxes will
eventually change. I would like call A1 to return the name of check box 1,
cell A2 to return the name of check box 2, and so on.

Any help would be greatly appreciated.

Thanks!

Chad
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Referencing Checkbox Name

Try this...

Sub Do_Cool_Stuff()
Dim CheckBoxes
CheckBoxes = Array(CheckBox1.Name, CheckBox2.Name, _
CheckBox3.Name, CheckBox4.Name, CheckBox5.Name)

Range("A1").Value = CheckBoxes(0)
Range("A2").Value = CheckBoxes(1)
Range("A3").Value = CheckBoxes(2)
Range("A4").Value = CheckBoxes(3)
Range("A5").Value = CheckBoxes(4)

End Sub


"Chad" wrote:

I was wondering how I could reference the name of a checkbox and assign it to
the value of a cell.

To give an example of what I am looking for:

I have 5 checkboxes on a sheet and the names of these checkboxes will
eventually change. I would like call A1 to return the name of check box 1,
cell A2 to return the name of check box 2, and so on.

Any help would be greatly appreciated.

Thanks!

Chad

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
Referencing Checkbox Names Chad Excel Worksheet Functions 1 July 18th 08 11:28 PM
referencing a checkbox Chad Excel Programming 9 July 11th 08 08:27 PM
link a checkbox in a sheet to a checkbox on a userform? Arjan Excel Programming 0 November 10th 06 01:37 PM
checkbox on form reset from checkbox on sheet raw[_12_] Excel Programming 1 December 3rd 05 05:08 AM
referencing a checkbox cell address in a worksheet Erik Andreassen[_2_] Excel Programming 1 June 28th 05 02:30 PM


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

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

About Us

"It's about Microsoft Excel"