View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Keith Keith is offline
external usenet poster
 
Posts: 55
Default Option Base 1; how to also make auto-arrays set to base 1?

John- thanks for the reply. I guess it just seems strange to me that MS
wouldn't have those 'on the fly' arrays also default to base 1 when Option
Base1 is on, and I wasn't sure if there was some other setting I needed to
change. It's too late to change my current projects, but I guess I'll need
to noodle on switching for any new projects.
Thanks,
Keith

"John Bundy" (remove) wrote in message
...
I know it is a pain as I was a big option base 1 guy, but the best thing to
do is just bite the bullet and go 0. it took a couple months to get down
but
now its second nature. Having mixed is bad news, especially if someone
else
has to mess with your code.
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"Keith" wrote:

Using XL 2003.
I generally set Option Base 1 in my projects, as a personal preference
(MS
gave us the option, so I'd think either way is ok).

However, even in Option Base 1 project, some arrays don't start with 1,
such
as:

Option Base 1
Sub testme
CArray = Array(1,2,3,4)
Msgbox CArray(1) 'returns a value of 2
End Sub

Is there a way to ensure that these 'on the fly' arrays also start with
Base
1, or am I stuck with having mixed array types if I assign these arrays
on
the fly?

Thanks!
Keith