republicbta.blogg.se

Excel vba on error goto line number
Excel vba on error goto line number






QuickBasic was an enhanced version of Basic published by Microsoft that supported optionally compiling programs into executables, rather than running then in the interpreter interactively. Ok LIST PRINT 2 + 7 30 PRINT 2 + 7 10 I = 42 20 PRINT I + 12 LIST RUN 20 LIST You are typing on a typewriter – with a roll of paper instead of a screen – and the typewriter responds back at you by printing on the paper as well!: Welcome to B.A.S.I.C. Remember: there are no cursor keys or screens. Why do something so arcane? because when Basic was invented it was intended to be interactive, in a world where the only form of interactivity was a command-line prompt, on a teletype-style printing terminal.Ī typical Basic session might have looked like this, where > stands for a command processor prompt (this is made-up, but close enough to how it worked).

excel vba on error goto line number

The line number told the Basic interpreter two things: a) that you were storing the line (otherwise the interpreter would execute it immediately), and b) in what position of the program the line belonged.

excel vba on error goto line number

In MS-Basic, like in every other Basic implementation of the era, every line you added to a program had to start with a line number. The syntax of VBA/VB6 is designed to be backwards-compatible with the syntax of QuickBasic, and before that with the syntax of GW-Basic/MS-Basic, which dates to the late 1970’s and even earlier: the original Dartmouth BASIC Language was created in the ’60s. I understand your dislike of the answer “start the line with a line number”, but you can’t argue with facts.








Excel vba on error goto line number