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

I can load an array and then it to another sheet. What I
would like to do is clear the array and then re-load it
with different data and write it below the existing data
on another sheet.

How can I clear the array after writing it to the second
sheet?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default reloading arrays

You can use the Erase statement to clear a static array.

Sub a()
Dim MyArray(0) As String
MyArray(0) = "abc"
MsgBox MyArray(0)
Erase MyArray
MsgBox MyArray(0)
End Sub


--
Jim Rech
Excel MVP
"JJ" wrote in message
...
|I can load an array and then it to another sheet. What I
| would like to do is clear the array and then re-load it
| with different data and write it below the existing data
| on another sheet.
|
| How can I clear the array after writing it to the second
| sheet?
|
| Thanks


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

To the OP: Although the array "MyArray" has been "cleared" by the
procedure below, it remains declared as a String() type array.

Alan Beban

Jim Rech wrote:
You can use the Erase statement to clear a static array.

Sub a()
Dim MyArray(0) As String
MyArray(0) = "abc"
MsgBox MyArray(0)
Erase MyArray
MsgBox MyArray(0)
End Sub


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
Excel List submenu missing in XP, after reloading builtin menus Mark Excel Worksheet Functions 3 April 14th 07 11:07 PM
Use of arrays DKS Excel Worksheet Functions 1 November 30th 06 08:38 PM
Use of arrays DKS Excel Worksheet Functions 0 November 30th 06 04:11 PM
Arrays drtaclem Excel Programming 0 December 10th 03 07:55 PM
arrays and others.. Locachica[_3_] Excel Programming 4 December 3rd 03 09:39 PM


All times are GMT +1. The time now is 02:45 AM.

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"