随笔分类 -  VBA

Excel VBA
摘要:1.将 互换 Excel 列号(数字/字母)Public Function excelColumn_numLetter_interchange(numOrLetter) As String Dim i, j, idx As Integer Dim letterArray ... 阅读全文
posted @ 2014-06-21 15:40 ssfie 阅读(1401) 评论(0) 推荐(0) 编辑
摘要:Option Explicit'==================================== 声明属性 =================================Private Con As ADODB.Connection' ==========================... 阅读全文
posted @ 2014-06-21 15:35 ssfie 阅读(460) 评论(0) 推荐(0) 编辑
摘要:1. 引用 API 函数' API函数Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _ ByVal lpClassName As String, _ ByVal lpWindow... 阅读全文
posted @ 2014-06-21 15:23 ssfie 阅读(1394) 评论(0) 推荐(0) 编辑
摘要:1.设置 页边距、打印区域With .PageSetup .HeaderMargin = Application.CentimetersToPoints(0.5) .LeftMargin = Application.CentimetersToPoints(1.5) .RightMargin =... 阅读全文
posted @ 2014-06-21 15:14 ssfie 阅读(966) 评论(0) 推荐(0) 编辑
摘要:1. 设置单元格边框:.Range("A3:M" & l + 1).SelectWith Selection.Borders() .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlHairline'... 阅读全文
posted @ 2014-06-21 14:37 ssfie 阅读(426) 评论(0) 推荐(0) 编辑
摘要:FROM: http://hi.baidu.com/kdlipm/blog/item/0897dd16ffc03e59f3de32ab.htmlPageSetup 函式就會記錄時, 設定的記錄三個部分:第一個部分會是 -With End With 區段設定的 PrintTitleRows 和的 PrintTitleColumns 。第二個部分,設定 PrintArea 。第三個部分是 With-End With 區段,設定所有其他的設定。第二個部分,設定 PrintArea 。第三個部分是 With-End With 區段,設定所有其他的設定。第三個部分是 With-End With 區段,設 阅读全文
posted @ 2013-07-19 15:49 ssfie 阅读(2003) 评论(0) 推荐(0) 编辑
摘要:VBA代码(珍藏)'**关闭屏幕刷新 Application.ScreenUpdating = False'**取消删除工作表警告提示 Application.DisplayAlerts = False '**引用打开窗口 Dim fd As FileDialog Dim vrtSelectedItem As Variant Set fd = Application.FileDialog(msoFileDialogOpen) fd.InitialFileName = Sheets("设置").Range("CU7").Value 阅读全文
posted @ 2013-01-27 15:06 ssfie 阅读(1204) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示