Instructions
- 1Launch AutoCAD.
- 2Click inside the "Command" section at the bottom of the window.
- 3Type "Vbaload," then press "Enter" on your keyboard.
- 4Click the "http://www.autodesk.com/vba-download" link in the pop-up window.
- 5Click the "AutoCAD VBA Module" link at the center of the window for your version of AutoCAD, then save the file to your computer. If you don't know your AutoCAD version, you can click "Help" at the top of your AutoCAD window, then click "About." The version is displayed at the top of the window.
- 6Close AutoCAD.
- 7Double-click the downloaded file, then follow the prompts to complete the installation.
- 8Launch AutoCAD.
- 9Click inside the "Command" section at the bottom of the window again, type "Vbastmt," then press "Enter" on your keyboard. This will display an "Expression:" prompt in the "Command" section.
- 10Copy and paste the VBA code to prompt you for two text numbers, then display the total once both of the numbers have been entered:Sub autocadsumnumbers()
Dim autocadinput1 As Integer
Dim autocadinput2 As Integer
Dim intSum As Integer
autocadinput1 = Val(InputBox("First Number"))
autocadinput2 = Val(InputBox("Second Number"))
autocadSum = autocadinput1 + autocadinput2
MsgBox autocadSum
End Sub
- 1