Dim strProName as stringstrProcname="Test1"CallByName me, strProcname, VbMethod, vbCrosshair或CallByName me, "Test1", VbMethod, vbCrosshair出错: 不支持对象的属性或方法除了CallByName,还有没有其它办法实现,我想此类功能很像C++的函数指针,向各位大虾求助?

解决方案 »

  1.   

    CallByName Text1, "MousePointer", VbLet, vbCrosshair这样是不是你要的...........
      

  2.   

    你没用对   再看下...........CallByName(object, procname, calltype,[args()])The CallByName function syntax has these named arguments:Part    Description object   Required; Variant (Object). The name of the object on which the function will be executed. procname  Required; Variant (String). A string expression containing the name of a property or method of the object.
     
    calltype  Required; Constant. A constant of type vbCallType representing the type of procedure being called. args()   Optional: Variant (Array).