怎么取得当前焦点控件数组的最大上标

fieldset{padding:10px;}

如何取得当前焦点控件数组的最大下标UBound(Me.ActiveControl)提示“缺少数组”Me.ActiveControl.UBound提示“对象不支持该属性或方法”——最佳解决方案——————————————————–枚举。——其他解决方案——————————————————–PrivateFunctionGetActiveCtrlUbound()AsIntegerDimxAsVB.ControlDimMaxIndexAsIntegerForEachxInMe.ControlsIfVBA.VarType(VBA.CallByName(Me,x.Name,VbGet))=vbObjectThen’控件数组Ifx.Name=Me.ActiveControl.NameThenIfMaxIndex<x.IndexThenMaxIndex=x.IndexEndIfEndIfNextGetActiveCtrlUbound=MaxIndexEndFunction——其他解决方案——————————————————–

引用:

PrivateFunctionGetActiveCtrlUbound()AsIntegerDimxAsVB.ControlDimMaxIndexAsIntegerForEachxInMe.ControlsIfVBA.VarType(VBA.CallByName(Me,x.Name,VbGet)……

顶哦——其他解决方案——————————————————–

引用:

PrivateFunctionGetActiveCtrlUbound()AsIntegerDimxAsVB.ControlDimMaxIndexAsIntegerForEachxInMe.ControlsIfVBA.VarType(VBA.CallByName(Me,x.Name,VbGet))=vbObjectTh……

谢谢,虽然ForEach比较耗资源,但好像也没更好的办法了。当你能爱的时候就不要放弃爱

怎么取得当前焦点控件数组的最大上标

相关文章:

你感兴趣的文章:

标签云: