View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jbl25[_8_] jbl25[_8_] is offline
external usenet poster
 
Posts: 1
Default Referencing Object Names with Variable


Hello,
I'm trying to loop through objects (CheckBox controls) on a worksheet
using a variable in the name. Based on the syntax for UserForm
controls, I'm trying

For x = 1 to 10
Worksheets("Sheet1").Controls("CheckBox" & x).Visible = True
Worksheets("Sheet1").Controls("CheckBox" & x).Enabled= True
Next

This gives me Run-time Error 438 "Object doesn't support this property
or method.

Thanks for your help!


--
jbl25
------------------------------------------------------------------------
jbl25's Profile: http://www.excelforum.com/member.php...fo&userid=7225
View this thread: http://www.excelforum.com/showthread...hreadid=399298