
vb5 Passing an array of type MENU to a Sub
R Seabrook,
Pass the control array as 'Object'; pass on/off switches as a paramarray.
The sub could be:
Sub Setmenu(Menus As Object, paramarray Vals() as variant) {
Dim i as integer
for i=0 to ubound(vals)
menus(i).checked = (vals(i)=true)
next
Quote:
}
And calling it would be like:
Setmenu mnuTools, true, true, false, false...
--A