12' Copyright 1995-2005 ESRI34' All rights reserved under the copyright laws of the United States.56' You may freely redistribute and use this sample code, with or without modification.78' Disclaimer: THE SAMPLE CODE IS PROVIDED "AS IS"
目錄ActiveCellActiveWorkbookAdvancedFilterAutoFillActiveCell1.檢查作用儲存格是否存在Sub activeCell()If ActiveCell Is Nothing Then End IfEnd Sub2.通過指定位移量設定作用儲存格Sub offset()ActiveCell.Offset(RowOffset:=-2, ColumnOffset:=4).ActivateEnd
VBA概述VBA(Visual Basic For Application)是VB語言在Office產品中的應用,它基於Visual Basic For Windows發展而來,Visual Basic For Windows是Microsoft於1992年推出的開發Windows應用程式的程式設計語言,由於語言簡單,易用易學,所以深受使用者的歡迎。而VBA的文法結構與Visual Basic For Windows基本相似,但它們之間是有本質區別的,Visual Basic For
一、引言建立完善的題庫是課程建設的一項重要工作,當資料庫的形式進行題庫管理,通過編寫抽題程式,在分類明確、題量豐富的題庫支援下,實現自動組卷並非難事。試卷一般都採用Word文檔,若採用VBA編程,要用程式將試題寫入到Word文檔,可以通過引用 Microsoft Word 9.0 Object Library中的相關對象來實現:圖片、圖形、文字框及藝術字等可利用Shapes集合對象的相應方法加入到文檔中;表格也可以通過Tables集合對象的Add
Private Declare Function GetDriveType Lib "kernel32" _ Alias "GetDriveTypeA" (ByVal nDrive As String) As LongPrivate Declare Function GetLogicalDriveStrings Lib "kernel32" _ Alias "GetLogicalDriveStringsA"