Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Array in VBA

Hi
How can I change the size of array in VBA ?
Is it possible to change static array or dynamic array ?
Please, help me.

THANKS !

Best regards,
Piotr



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Array in VBA

Try sticking Dynamic Array Excel VBA into google......

"Piotr" wrote in message
...
Hi
How can I change the size of array in VBA ?
Is it possible to change static array or dynamic array ?
Please, help me.

THANKS !

Best regards,
Piotr





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Array in VBA

Ok, THANKS !!!

Best regards,
Piotr :-)


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Array in VBA

Dim ary, i

ReDim ary(1 To 5)
For i = 1 To 5
ary(i) = i
Next i
MsgBox ary(5)

ReDim Preserve ary(1 To 6)
ary(6) = 6
MsgBox ary(5)
MsgBox ary(6)

--
HTH

Bob Phillips

"Piotr" wrote in message
...
Hi
How can I change the size of array in VBA ?
Is it possible to change static array or dynamic array ?
Please, help me.

THANKS !

Best regards,
Piotr





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Array in VBA

Ok, THANKS !!!

Best regards,
Piotr :-)




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Array in VBA

Also check the responses in .developer.vba

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi
How can I change the size of array in VBA ?
Is it possible to change static array or dynamic array ?
Please, help me.

THANKS !

Best regards,
Piotr




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Array in VBA

Dynamic array, yes; static array, no. What do you want to change? From
what to what?

Alan Beban

Piotr wrote:
Hi
How can I change the size of array in VBA ?
Is it possible to change static array or dynamic array ?
Please, help me.

THANKS !

Best regards,
Piotr



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Array in VBA

In one dimension there is no problem.
If I have twoj dimensions or more... I lose my data - but If I use ReDim
Preserve I won't lost data only in the last dimension ?
Is there any other possibilities ?

Best regards,
Piotr :-)



"Alan Beban" wrote in message
...
Dynamic array, yes; static array, no. What do you want to change? From
what to what?

Alan Beban

Piotr wrote:
Hi
How can I change the size of array in VBA ?
Is it possible to change static array or dynamic array ?
Please, help me.

THANKS !

Best regards,
Piotr





  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Array in VBA

Let me try again. What do you want to change from what to what? Perhaps
you could give a simple illustration of what you are trying to achieve
in a two-dimensional array.

Alan Beban

Piotr wrote:
In one dimension there is no problem.
If I have twoj dimensions or more... I lose my data - but If I use ReDim
Preserve I won't lost data only in the last dimension ?
Is there any other possibilities ?

Best regards,
Piotr :-)



"Alan Beban" wrote in message
...

Dynamic array, yes; static array, no. What do you want to change? From
what to what?

Alan Beban

Piotr wrote:

Hi
How can I change the size of array in VBA ?
Is it possible to change static array or dynamic array ?
Please, help me.

THANKS !

Best regards,
Piotr






  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Array in VBA

Hi Alan
I havn't any real problem - I learn VBA and I'd like to know all
possibiliteis about changing size of arrays. Sorry if my questions are
stupid :-(

Best regards,
Piotr


"Alan Beban" wrote in message
...
Let me try again. What do you want to change from what to what? Perhaps
you could give a simple illustration of what you are trying to achieve
in a two-dimensional array.

Alan Beban

Piotr wrote:
In one dimension there is no problem.
If I have twoj dimensions or more... I lose my data - but If I use ReDim
Preserve I won't lost data only in the last dimension ?
Is there any other possibilities ?

Best regards,
Piotr :-)



"Alan Beban" wrote in message
...

Dynamic array, yes; static array, no. What do you want to change? From
what to what?

Alan Beban

Piotr wrote:

Hi
How can I change the size of array in VBA ?
Is it possible to change static array or dynamic array ?
Please, help me.

THANKS !

Best regards,
Piotr










  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Array in VBA

No, no! Not stupid at all. I'm just trying to get a fix on exactly what
you are trying to accomplish.

You might want to review the Sub Procedure ResizeArray in the freely
downloadable file at http://home.pacbell.net/beban

Alan Beban

Piotr wrote:
Hi Alan
I havn't any real problem - I learn VBA and I'd like to know all
possibiliteis about changing size of arrays. Sorry if my questions are
stupid :-(

Best regards,
Piotr

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex conditional summing - array COUNT works, array SUM gives#VALUE fatcatfan Excel Worksheet Functions 4 November 18th 09 06:41 PM
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Assigning 10x1 array to 2nd collumn of 10x3 array Alan Beban[_2_] Excel Programming 0 July 30th 04 01:38 AM
variant array containing cel adresses convert to actual ranges-array Peter[_21_] Excel Programming 5 December 10th 03 09:50 PM


All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"