![]() |
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 |
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 |
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 |
Array in VBA
Ok, THANKS !!!
Best regards, Piotr :-) |
Array in VBA
Ok, THANKS !!!
Best regards, Piotr :-) |
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 |
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 |
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 |
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 |
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 |
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 |
Array in VBA
Thank you Alan :-)))
It's very helpful :-)))) Best regards, Piotr :-) "Alan Beban" wrote in message ... 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 |
All times are GMT +1. The time now is 01:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com