VBA
Chobitssp
这个作者很懒,什么都没留下…
展开
-
VBA 合并单元格
Sub a()Application.DisplayAlerts = FalseDim i As Integer: i = 3Do While Not IsEmpty(ActiveSheet.Cells(i, 1))If ActiveSheet.Cells(i, 1) = ActiveSheet.Cells(i - 1, 1) ThenCall b(i - 1, i)End Ifi原创 2012-07-24 15:35:05 · 1018 阅读 · 0 评论 -
VBA 转置
Public Sub a()Dim sr1 As Integer: sr1 = Selection.Item(1).RowDim sr2 As Integer: sr2 = 1Dim i As Long: i = 1Do While i <= Selection.CountFor j = ColumnStart(Selection) To ColumnEnd(Selection)If原创 2012-07-24 15:42:40 · 2406 阅读 · 0 评论 -
VBA 插入批注
Sub pictopz() Dim cell As Range, fd, t, w As Byte, h As Byte Selection.ClearComments If Selection(1) = "" Then MsgBox "不能选择空白区。", 64, "提示": Exit SubOn Error Resume Next '错误继续 On Erro转载 2012-07-24 15:30:34 · 1883 阅读 · 0 评论 -
VBA 读取图片大小
Private Declare Function GetObjectAPI Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long Private Type BITMAP bmType As Long bmWidth转载 2012-07-24 15:38:09 · 5296 阅读 · 0 评论 -
VBA 下载文件
Function GetWebCode(ByVal strUrl As String) As StringDim HSet H = CreateObject("microsoft.XMLHTTP")H.Open "get", strUrl, FalseH.sendGetWebCode = H.responseTextSet H = NothingEnd FunctionSub B原创 2012-07-24 15:39:53 · 3242 阅读 · 0 评论 -
excel VBA 更新 access
1.添加引用 Microsoft ActiveX Data Objects 2.X Library2. vba代码Sub update_access()Dim path As Stringpath = ""Dim cnn As ADODB.Connection'Dim rs As ADODB.RecordsetSet cnn = New ADODB.Connect原创 2013-05-03 11:36:05 · 1703 阅读 · 0 评论