Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
store chkbox.caption in array
store chkbox.caption of selected checkboxes only in array. suppose.. chkbox1.caption is = FARES chkbox2.caption is = RULES chkbox3.caption is = ZONES chkbox4.caption is = CONDITIONS chkbox5.caption is = ROUTING now below are chkbox selected from above.. chkbox1 chkbox3 chkbox4 get the name of selected chkboxes and store as... MyArray = Array("FARES", "ZONES", "CONDITIONS" -- ilyaskaz ----------------------------------------------------------------------- ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396 View this thread: http://www.excelforum.com/showthread.php?threadid=37703 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
store chkbox.caption in array
Assume the checkboxes are from the control toolbox toolbar and are located
on a userform: Dim myArray(), i as long, j as Long Redim MyArray(1 to 5) j = 0 for i = 1 to 5 if userform1.controls("chkbox" & i).Value = True then j = j + 1 myarray(j) = userform1.Controls("chkbox" & i).caption end if Next if j 0 then Redim Preserve MyArray(1 to j) else erase myArray End if -- Regards, Tom Ogilvy "ilyaskazi" wrote in message ... store chkbox.caption of selected checkboxes only in array. suppose.. chkbox1.caption is = FARES chkbox2.caption is = RULES chkbox3.caption is = ZONES chkbox4.caption is = CONDITIONS chkbox5.caption is = ROUTING now below are chkbox selected from above.. chkbox1 chkbox3 chkbox4 get the name of selected chkboxes and store as... MyArray = Array("FARES", "ZONES", "CONDITIONS") -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=377033 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
store chkbox.caption in array
working perfect... but is it possible if our checkboxes names (not caption) are customize as per our requirement -- ilyaskaz ----------------------------------------------------------------------- ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396 View this thread: http://www.excelforum.com/showthread.php?threadid=37703 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
store chkbox.caption in array
Dim myArray(), i as long, j as Long
Redim MyArray(1 to 5) j = 0 for i = 1 to 5 if userform1.controls("chkbox" & i).Value = True then j = j + 1 myarray(j) = "chkbox" & i end if Next if j 0 then Redim Preserve MyArray(1 to j) else erase myArray End if -- Regards, Tom Ogilvy "ilyaskazi" wrote in message ... working perfect... but is it possible if our checkboxes names (not caption) are customized as per our requirement. -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=377033 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Store array ??? | Excel Worksheet Functions | |||
Can one store a string in a Array element? | Excel Discussion (Misc queries) | |||
Trying To Store Shapes/Objects to an array ?? | Excel Programming | |||
Trying To Store Shapes/Objects to an array ?? | Excel Programming |