Many
Microsoft Excel users who begin to learn Excel VBA have often asked
these two questions like Michael, one of our website visitors:
I have just started learning Microsoft Excel VBA. Can you please help
me with two problems?
1. What statement must be used to 'end' a macro?
2. What happens if you insert an apostrophe at the beginning of a macro
statement? Thanks.
Michael
P. S.: I'm using MS Excel 2003.
The macro code:
Sub finalprice()
'Range("D2").Value = Range("B2").Value + Range("C2").Value *
Range("B2").Value
MsgBox ("Please remove the apostrophe to perform the calculation")
End Sub
We can often use the apostrophe to try out different versions
of our macro code. Once we are satisfied with our final working we can
delete the commented code or keep it for future reference.