3,Return without GoSub
5,Invalid procedure call
6,Overflow
7,Out of memory
9,Subscript out of range
10,This array is fixed or temporarily locked
11,Division by zero
13,Type mismatch
14,Out of string space
16,Expression too complex
17,Cant perform requested operation
18,User interrupt occurred
20,Resume without error
28,Out of stack space
35,Sub Function or Property not defined
47,Too many DLL application clients
48,Error in loading DLL
49,Bad DLL calling convention
51,Internal error
52,Bad file name or number
53,File not found
54,Bad file mode
55,File already open
57,Device I/O error
58,File already exists
59,Bad record length
61,Disk full
62,Input past end of file
63,Bad record number
67,Too many files
68,Device unavailable
70,Permission denied
71,Disk not ready
74,Cant rename with different drive
75,Path/File access error
76,Path not found
91,Object variable or With block variable not set
92,For loop not initialized
93,Invalid pattern string
94,Invalid use of Null
97,Cant call Friend procedure on an object that is not an instance of the
defining class
98,A property or method call cannot include a reference to a private object
298,System DLL could not be loaded
320,Cant use character device names in specified file names
321,Invalid file format
322,Can’t create necessary temporary file
325,Invalid format in resource file
327,Data value named not found
328,Illegal parameter; cant write arrays
335,Could not access system registry
336,ActiveX component not correctly registered
337,ActiveX component not found
338,ActiveX component did not run correctly
360,Object already loaded
361,Cant load or unload this object
363,ActiveX control specified not found
364,Object was unloaded
365,Unable to unload within this context
368,The specified file is out of date. This program requires a later version
371,The specified object cant be used as an owner form
在VB中要想调用Excel,需要打开VB编程环境“工程”菜单中的“引用”项目,并选取项目中的“Microsoft Excel 11.0 object library”项。由于你的Excel版本不同,所以这个选项的版本号也是不同的。
因为EXCEL是以层次结构组织对象的,其对象模型中含有许多不同的对象元素。
&n ......
Public Declare Function VarPtrArray Lib "msvbvm60.dll" Alias "VarPtr" (Var() As Any) As Long
Public Declare Function VarPtrStringArray Lib "msvbvm60.dll" Alias "VarPtr" (Var() As Any) As Long
取对象地址: ObjPtr
取OLE对象的地址: OLE_NAME.LpOleObject
取函数地址: AddressOf
取字符串地址: StrPtr
取 ......