摘要:
//命令按钮点击触发事件 private void button2_Click(object sender, EventArgs e) { if (dataGridView1.Rows.Count==0) return;//判断是否有数据,没有就返加 Microsoft.Office.Interop 阅读全文
摘要:
//引用Microsoft.Office.Interop.Outlook.dll using Outlook = Microsoft.Office.Interop.Outlook; using Microsoft.Office.Interop.Outlook; Outlook.Application 阅读全文
摘要:
Dim r% Sub ImportFromTextFile() Dim fso As Object, sFile As Object, blnExist As Boolean Dim FileName As String, i As Integer, iCol As Integer, LineTex 阅读全文
摘要:
Sub OPENSANDEXC() Dim Conn As Object, Rst As Object Dim sql As String, Path As String Dim i As Integer, PathStr As String Set Conn = CreateObject("ADO 阅读全文
摘要:
Sub Getoutlook() Dim ol As Object, dates As Date, t%, i% i = sheet5.Range("b65536").End(xlUp).Row Set ol = CreateObject("outlook.application") '后期绑定 F 阅读全文
摘要:
Function Range2Html(oRng As Range) As String '只读打开文本文档 Const ForReading = 1 '可写打开文本文档 Const ForWriting = 2 '追加打开文本文档,写在原文本文档的末尾 Const ForAppending = 8 阅读全文
摘要:
Application.Calculation = xlCalculationManual '手动计算 Application.Calculation = xlCalculationAutomatic '自动计算 Application.ScreenUpdating = False '关闭屏幕刷新 阅读全文
摘要:
Sub 透视表() Dim PTC As PivotCache Dim PVT As PivotTable Dim rng As Range Set rng = Sheet1.Range("a1:d45") '数据源 Set PTC = ActiveWorkbook.PivotCaches.Crea 阅读全文
摘要:
Sub 文件夹路径() Dim fp$, obmapp As Object Set obmapp = CreateObject("Shell.Application").BrowseForFolder(0, "请选择文件目录:", 0, 0) If Not obmapp Is Nothing The 阅读全文
摘要:
Sub 取消工作表保护() Dim sht As Worksheet For Each sht In Worksheets sht.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _ , AllowFiltering:=Tr 阅读全文