标签:bsp stat 清单 ima book status private object before
清单2.1 通过控制台应用程序自动化Excel
Imports Excel = Microsoft.Office.Interop.Excel Module Module1 Private exitXL As Boolean = False Dim WithEvents myExcelApp As Excel.Application Sub Main() myExcelApp = New Excel.Application myExcelApp.Visible = True myExcelApp.StatusBar = "Hello World" myExcelApp.Workbooks.Add() While exitXL = False System.Windows.Forms.Application.DoEvents() End While End Sub Private Sub myExcelApp_SheetBeforeDoubleClick(ByVal sheet As Object, ByVal target As Excel.Range, ByRef cancel As Boolean) Handles myExcelApp.SheetBeforeDoubleClick exitXL = True End Sub End Module
运行结果:
Visual Basic 2017 操作Excel和word【2】持续更新……
标签:bsp stat 清单 ima book status private object before
原文地址:http://www.cnblogs.com/xiehaofeng/p/7608195.html