模組 (Visual Basic)Modules (Visual Basic)

Visual Basic 提供數個模組,可讓您簡化程式碼中的一般工作,包括操作字串、執行數學計算、取得系統資訊、執行檔案和目錄作業等等。Visual Basic provides several modules that enable you to simplify common tasks in your code, including manipulating strings, performing mathematical calculations, getting system information, performing file and directory operations, and so on. 下表列出 Visual Basic 所提供的模組。The following table lists the modules provided by Visual Basic.

Constants 包含其他常數。Contains miscellaneous constants. 這些常數可以在程式碼中的任何位置使用。These constants can be used anywhere in your code.
ControlChars 包含用於列印和顯示文字的常數控制字元。Contains constant control characters for printing and displaying text.
Conversion 包含將十進位數轉換成其他基底的成員、數位的字串、數位的字串,以及另一個資料類型。Contains members that convert decimal numbers to other bases, numbers to strings, strings to numbers, and one data type to another.
DateAndTime 包含取得目前日期或時間、執行日期計算、傳回日期或時間、設定日期或時間,或處理常式持續時間的成員。Contains members that get the current date or time, perform date calculations, return a date or time, set the date or time, or time the duration of a process.
ErrObject 包含執行時間錯誤和引發或清除錯誤之方法的相關資訊。Contains information about run-time errors and methods to raise or clear an error.
FileSystem 包含執行檔案、目錄或資料夾以及系統作業的成員。Contains members that perform file, directory or folder, and system operations.
Financial 包含用來執行財務計算的程式。Contains procedures that are used to perform financial calculations.
Globals 包含目前腳本引擎版本的相關資訊。Contains information about the current scripting engine version.
Information 包含傳回、測試或驗證資訊的成員,例如陣列大小、類型名稱等等。Contains the members that return, test for, or verify information such as array size, type names, and so on.
Interaction 包含與物件、應用程式和系統互動的成員。Contains members interact with objects, applications, and systems.
Strings 包含執行字串作業的成員,例如重新格式化字串、搜尋字串、取得字串長度等等。Contains members that perform string operations such as reformatting strings, searching a string, getting the length of a string, and so on.
VBMath 包含成員執行數學運算。Contains members perform mathematical operations.

請參閱See also