Thread: Dim and Redim
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Dim and Redim

You do not want to specify "As Integer" on the redim statement...

dim arr() as integer

redim preserve arr(20)

--
HTH...

Jim Thomlinson


"Sean" wrote:

Hi All,

I am interested in knowing why this is not working ....

dim arr() as integer

some code .....

redim preserve arr(20) as integer

If I use redim in the first line - redim arr() as integer then it works.

So in short my question is why redim doesn't work after dim on the same
array? It says it is supposed to work according to the excel help files.

thanx