ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Refer checkbox by name in a loop (https://www.excelbanter.com/excel-programming/368109-refer-checkbox-name-loop.html)

Xtender

Refer checkbox by name in a loop
 

Hello! I'm using a loop with counter, wich increases by one each time
The idea is to go through many checkboxes, check their value an
perform certain actions if it's "TRUE". However, I fail to refer t
checkboxes:

Code
-------------------
MyObject = Trim("CheckBox") & Trim(Str(Counter))
MyValue = MyObject.Value(
-------------------

As MyObject is a String, exel says : Runtime error '424' Objec
required.
How can I go through these checkboxes in a loop?
Many thanks

--
Xtende
-----------------------------------------------------------------------
Xtender's Profile: http://www.excelforum.com/member.php...fo&userid=3669
View this thread: http://www.excelforum.com/showthread.php?threadid=56423


Xtender[_2_]

Refer checkbox by name in a loop
 

Here is the answer from another forum:
http://www.ozgrid.com/forum/showthre...d=1#post278392


--
Xtender
------------------------------------------------------------------------
Xtender's Profile: http://www.excelforum.com/member.php...o&userid=36693
View this thread: http://www.excelforum.com/showthread...hreadid=564233


Bob Phillips

Refer checkbox by name in a loop
 
There is rarely a need to post in multiple places, we either visit others,
or someone will give you an answer.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Xtender" wrote in
message ...

Here is the answer from another forum:
http://www.ozgrid.com/forum/showthre...d=1#post278392


--
Xtender
------------------------------------------------------------------------
Xtender's Profile:

http://www.excelforum.com/member.php...o&userid=36693
View this thread: http://www.excelforum.com/showthread...hreadid=564233





All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com