Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Adding to arrays

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 29 May 2008 19:19 GMT
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
JLGWhiz - 29 May 2008 19:27 GMT
Check out the ReDim method in VBA help.

> Hi
>
[quoted text clipped - 12 lines]
>
> Steve
Steve - 29 May 2008 19:38 GMT
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

> Check out the ReDim method in VBA help.
>
[quoted text clipped - 14 lines]
> >
> > Steve
Alan Beban - 29 May 2008 19:56 GMT
Dim a
ReDim a(1 to 4)
a=Array(1,2,3,4)
ReDim Preserve a(1 to 5)
a(5)=5

Alan Beban

> Thanks, I can see that this resizes teh array but still not sure how to add
> to the array.
[quoted text clipped - 23 lines]
>>>
>>>Steve
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.