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

and me in XL2007

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Tom Ogilvy" wrote in message
...
Your code returned a 1 for me using xl2003.

--
Regards,
Tom Ogilvy




"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