2014年5月4日

VBA api创建进度条

摘要: Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwE As Long, ByVal lpC As String, ByVal lpW As String, ByVal dwS A... 阅读全文

posted @ 2014-05-04 19:33 鱼东鱼 阅读(756) 评论(0) 推荐(0) 编辑

2014年4月24日

VBA 里面注册dll

摘要: Shell "Regsvr32 /u /s " & VBA.Chr(34) & ThisWorkbook.Path & "\code.dll" & Chr(34)Shell "Regsvr32 /s " & VBA.Chr(34) & ThisWorkbook.Path & "\code.dll" ... 阅读全文

posted @ 2014-04-24 19:39 鱼东鱼 阅读(1042) 评论(0) 推荐(0) 编辑

2014年4月9日

qsort

摘要: Option ExplicitPrivate Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)Declare Function Compare Lib "user32" Alias _"CallWindowProcA" (ByVal pfnCompare As Long, ByVal pElem1 As Long, _ ByVal 阅读全文

posted @ 2014-04-09 08:15 鱼东鱼 阅读(254) 评论(0) 推荐(0) 编辑

2014年4月6日

类里面强制调用回调函数

摘要: Option Explicit'-Callback declarations for Paul Caton thunking magic----------------------------------------------Private z_CbMem As Long 'Callback allocated memory addressPrivate z_Cb() As Long 'Callback thunk arrayPrivate Declare Function GetModuleHandleA Lib "kernel32" (ByVa 阅读全文

posted @ 2014-04-06 21:13 鱼东鱼 阅读(492) 评论(0) 推荐(0) 编辑

VB中数据占几个字节

摘要: 数据类型 字节型 byte 1 布尔型 boolean 2 整型 integer 2 长整型 long 4 单精度 single 4 双精度 double 8 货币型 currency 8 日期型 date 8 对象型 object 4 变长字符串 string 1字节/字符 阅读全文

posted @ 2014-04-06 12:13 鱼东鱼 阅读(1649) 评论(1) 推荐(0) 编辑

2014年4月3日

VBA ArrayList类 还可以继续扩展

摘要: Option ExplicitPrivate m_elements() As VariantPrivate m_size As LongPrivate m_capacity As LongPrivate m_dic As DictionaryPrivate Sub Class_Initialize() ReDim m_elements(9) m_size = 0 m_capacity = 10 Set m_dic = New DictionaryEnd SubPublic Property Get Capacity() As Long 'all capacity in... 阅读全文

posted @ 2014-04-03 20:59 鱼东鱼 阅读(2604) 评论(0) 推荐(0) 编辑

2014年4月2日

VBA 直接运行命令拿到返回值

摘要: Option ExplicitPublic Type PROCESS_INFORMATION hProcess As Long 'スフセ莖・ hThread As Long 'スフオトヨ゚ウフセ莖・ dwProcessId As Long 'スフID dwThreadId As Long 'スフオトヨ゚ウフIDEnd TypePrivate Type STARTUPINFO cb As Long lpReserved As String lpDesktop As String lpTitle As String dwX ... 阅读全文

posted @ 2014-04-02 22:07 鱼东鱼 阅读(1016) 评论(0) 推荐(1) 编辑

2014年3月30日

vba ADO

摘要: Function GetCon(DataSource As String, Optional WithTitle As Boolean = True, Optional Password As String = "") As Connection If DataSource = "" Then Set GetCon = Nothing Exit Function End If Dim hdr As String If WithTitle Then hdr = "yes" Else hdr = "no"... 阅读全文

posted @ 2014-03-30 22:36 鱼东鱼 阅读(553) 评论(1) 推荐(0) 编辑

2014年3月23日

vba窗口中显示右键

摘要: Dim flagPrivate Sub TextBox1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)On Error Resume NextIf Button = 2 And Not flag ThenOn Error Resume NextApplication.CommandBars("dddd").DeleteApplication.CommandBars.Add "dddd", msoBarPopu 阅读全文

posted @ 2014-03-23 14:27 鱼东鱼 阅读(585) 评论(0) 推荐(0) 编辑

2014年3月19日

VBA 解析 json

摘要: ' VBJSON is a VB6 adaptation of the VBA JSON project at http://code.google.com/p/vba-json/' Some bugs fixed, speed improvements added for VB6 by Michael Glaser (vbjson@ediy.co.nz)' BSD Licensed‘cJSONScriptOption ExplicitConst INVALID_JSON As Long = 1Const INVALID_OBJECT As Long = 2Const 阅读全文

posted @ 2014-03-19 22:27 鱼东鱼 阅读(4293) 评论(0) 推荐(0) 编辑

导航