View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default When DIM statements don't work

Each programming language has its on syntax and conventions. If they were
all the same, there would be no reason to have more than one language.
Conventions are determined by the author of the language.

A better question is why would someone try to use a programming language
without learning the syntax and conventions.

Use of Dim is not required. So if you want the default type, then you don't
need to use it. However, the usual recommendation is to put in Option
Explict at the top of the module. This forces every variable to be declared
with a dim statement. It is useful because if you mispell you variable, the
debugger will flag it as undeclared. Otherwise, you might miss that you
have created a subtle error.

--
Regards,
Tom Ogilvy

wrote in message
...
Many thanks to both Trevor and Pikus for their help. Two
things still bother me:

1. what is the use of a Dim statement if the default type
is what you get anyway?

2. why would the originator of VB not follow the
conventions of other programming languages and allow multi
variables to be typed the same in the same line?