VBA Programming Series...30 - IT Skills

This blog is for IT lovers, accounts and finance executives who want to add value in their professional life.

test

Welcome to our blog. This blog is for IT lovers, Accounts/Finance Executives who wants to add value in their career path.

Search This Blog

Saturday, 9 June 2018

VBA Programming Series...30

test

Using Labels


In early versions of BASIC, every line of code required a line number. For example, if you had written a BASIC program in the ’70s (dressed, of course, in your bell bottoms), it may have looked something like this:


10: LET X=5
20: LET Y=3
30: LET Z=X*Y
40: PRINT Z
50: END

VBA permits the use of such line numbers, and it even permits text labels. You don’t typically use a label for each line, but you may occasionally need to use a label. For example, insert a label if you use a GoTo statement (which I dis-cuss in Chapter 10). A label must begin with the first nonblank character in a line and end with a colon.


The information in this article becomes clearer as you read subsequent articles. If you want to find out more about VBA language elements, I refer you to the VBA Help system. You can find as much detail as you need, or care, to know.

No comments:

Post a Comment

Popular

Welcome to our blog. If you want to; learn writing skills, preparation for CSS/Corporate laws, IT skills, downloading Business/IT books, and many more; this blog is for you.