By using listi.net you agree to our
cookie policy
, We and our partners operate globally and use cookies, for multiple purposes
Close
listi.net
Hello World!
The VB Editor is where you will enter a VBA Code.
You can either:
Record a Macro
Import code as a module
Search for code, copy and paste in
type your code.
There are typically 4 Windows you will use
Code Window
Immediate Window
Project Explorer
Properties Window
Let's write some VBA Code!
Editor
Open a new Excel WorkBook aka an Excel file
Press
Alt
F11
or
Developer > Visual Basic
to go to the Editor
Editor has an old style Windows menu and not a ribbon at the top
Below that are a toolbox of icons
Leftmost one will switch you to Excel
View > Code
opens a Coding windows where you can enter your VBA or Macro statements
There are two drop-down or combo-boxes at the top. The right one is the Procedure drop-down and the left one is the Object drop-down
Set the following options
Tools > Options
Enter your first program
Click the code window start typing type following:
Sub HelloWorld()
msgbox "Hello world"
End sub
Press the Play button or
F5
to run the code.
The Hello World Message box displays
Please enable JavaScript to view the
comments powered by Disqus.
blog comments powered by
Disqus