Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Adding to arrays

Hi

I'm new to arrays and although I think I can work most of it out using the
help file, i'm struggling to find out how I add to an array.

e.g.

a=(1,2,3,4)

How can I add 5 to the end

Your help would be much appreciated.

Many Thanks

Steve
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Adding to arrays

Check out the ReDim method in VBA help.

"Steve" wrote:

Hi

I'm new to arrays and although I think I can work most of it out using the
help file, i'm struggling to find out how I add to an array.

e.g.

a=(1,2,3,4)

How can I add 5 to the end

Your help would be much appreciated.

Many Thanks

Steve

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Adding to arrays

Thanks, I can see that this resizes teh array but still not sure how to add
to the array.

Maybe I'm missing something here!!#

Cheers

Steve

"JLGWhiz" wrote:

Check out the ReDim method in VBA help.

"Steve" wrote:

Hi

I'm new to arrays and although I think I can work most of it out using the
help file, i'm struggling to find out how I add to an array.

e.g.

a=(1,2,3,4)

How can I add 5 to the end

Your help would be much appreciated.

Many Thanks

Steve

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Adding to arrays

Dim a
ReDim a(1 to 4)
a=Array(1,2,3,4)
ReDim Preserve a(1 to 5)
a(5)=5

Alan Beban

Steve wrote:
Thanks, I can see that this resizes teh array but still not sure how to add
to the array.

Maybe I'm missing something here!!#

Cheers

Steve

"JLGWhiz" wrote:


Check out the ReDim method in VBA help.

"Steve" wrote:


Hi

I'm new to arrays and although I think I can work most of it out using the
help file, i'm struggling to find out how I add to an array.

e.g.

a=(1,2,3,4)

How can I add 5 to the end

Your help would be much appreciated.

Many Thanks

Steve

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
adding arrays from multiple workbooks Neil Eves[_3_] Excel Programming 1 March 28th 08 06:46 PM
Arrays - declaration, adding values to arrays and calculation Maxi[_2_] Excel Programming 1 August 17th 06 04:13 PM
vba adding arrays Jeff Excel Discussion (Misc queries) 1 November 4th 05 02:50 PM
Adding arrays Dan[_30_] Excel Programming 1 January 12th 04 09:49 PM
Adding Arrays spre Excel Programming 0 July 24th 03 04:59 PM


All times are GMT +1. The time now is 09:21 PM.

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

About Us

"It's about Microsoft Excel"