View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Adding Zeros in front of numbers in cells using Excel 2003

the references are unique to the workbook. Moving the file to another
computer doesn't magically add references.

In the thousands of author's whose code I have seen, you are the first I
have seen who recommends routinely prefacing VBA commands with the VBA
qualifier.

And you don't even seem to be hard over on it:

Recent post
Workbooks("Book1.xls").Worksheets("Sheet1").Range( CStr(x) & ":" &
CStr(y)).Rows.Count
instead of
Workbooks("Book1.xls").Worksheets("Sheet1").Range( VBA.CStr(x) & ":" &
VBA.CStr(y)).Rows.Count


--
Regards,
Tom Ogilvy


"Ronald Dodge" wrote in message
...
Well if anything that I have learned from my years of programming, it's
best
practice not to leave things to potential ambiguity. When you don't
prequalify your code, as time passes by, your code could become ambiguity
by
other additions/modifications, so it's best right from the start not to
leave that chance as a possibility.

As for Left and Right, those are very common ones to get mixed up. Yes,
you
can set the priority order of the different references, but that doesn't
resolve every possible ambiguity situation. Yes, the VBA should be the
second one in the list, only to the Excel Object to be the first one in
the
list as far as VBA in Excel is concerned. But even then, how do you even
know it's that same order on another computer, if others are using it?

--
Ronald R. Dodge, Jr.
Production Statistician/Programmer
Master MOUS 2000