Excel 2019 Bible

(singke) #1

Chapter 42: Introducing Visual Basic for Applications


42


If you don’t see the list of open workbooks, choose Project Explorer from the View menu or press Ctrl+R to display the
Project Explorer.


Figure 42.8 shows the recorded macro, as displayed in the Code window.

FIGURE 42.8
The MyName procedure was generated by the Excel macro recorder.

The macro should look something like this (with your name substituted in, of course):

Sub MyName()
'
' MyName Macro
'
' Keyboard Shortcut: Ctrl+Shift+N
'
ActiveCell.FormulaR1C1 = "Dick Kusleika"
Range("F15").Select
End Sub

The macro recorded is a Sub procedure that is named MyName. The statements tell Excel
what to do when the macro is executed.
Free download pdf