Code to find Number of command buttons

Status
Not open for further replies.
why would you want such a code?
to find out the no. of cmd buttons in runtime?

i guess you can use command buttons as an array and find the size of the array to get the no. of cmd buttons
 

siriusb

Cyborg Agent
dim cntrl as control
dim count as integer

for each cntrl in form.controls
If TypeOf cntrl Is CommandButton Then
count = count + 1
end if
end each
 
Status
Not open for further replies.
Top Bottom