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

hi
is there any way to erase array elements having no values stored in it?
"if len(array(a,b))<=0 then erase"
will this work?
thanks
--
hemu
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default earasing arrays

The code you show does not demonstrate that the array has no values in it,
it is just testing a particular element of the array.

Erase clears an array down, or as help puts it, Reinitializes the elements
of fixed-size arrays and releases dynamic-array storage space. But if the
array is empty, there is no need to clear it is there not?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in message
...
hi
is there any way to erase array elements having no values stored in it?
"if len(array(a,b))<=0 then erase"
will this work?
thanks
--
hemu



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

hi Bob
i'm using writline method to put array containts in text file
But while collecting data some lines in other text files are blank
which are stored in an array
so again while writing to new txt file these lines get written angain
therefor i want to delete or erase empty elements in an array
please help
--
hemu


"Bob Phillips" wrote:

The code you show does not demonstrate that the array has no values in it,
it is just testing a particular element of the array.

Erase clears an array down, or as help puts it, Reinitializes the elements
of fixed-size arrays and releases dynamic-array storage space. But if the
array is empty, there is no need to clear it is there not?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in message
...
hi
is there any way to erase array elements having no values stored in it?
"if len(array(a,b))<=0 then erase"
will this work?
thanks
--
hemu




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default earasing arrays

can you show us the code?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in message
...
hi Bob
i'm using writline method to put array containts in text file
But while collecting data some lines in other text files are blank
which are stored in an array
so again while writing to new txt file these lines get written angain
therefor i want to delete or erase empty elements in an array
please help
--
hemu


"Bob Phillips" wrote:

The code you show does not demonstrate that the array has no values in

it,
it is just testing a particular element of the array.

Erase clears an array down, or as help puts it, Reinitializes the

elements
of fixed-size arrays and releases dynamic-array storage space. But if

the
array is empty, there is no need to clear it is there not?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in message
...
hi
is there any way to erase array elements having no values stored in

it?
"if len(array(a,b))<=0 then erase"
will this work?
thanks
--
hemu






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default earasing arrays

hi bob
if not len(atrray(n)<=0 then
s.writeline array(n)
end if
this code worked fine
thanks
--
hemu


"Bob Phillips" wrote:

can you show us the code?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in message
...
hi Bob
i'm using writline method to put array containts in text file
But while collecting data some lines in other text files are blank
which are stored in an array
so again while writing to new txt file these lines get written angain
therefor i want to delete or erase empty elements in an array
please help
--
hemu


"Bob Phillips" wrote:

The code you show does not demonstrate that the array has no values in

it,
it is just testing a particular element of the array.

Erase clears an array down, or as help puts it, Reinitializes the

elements
of fixed-size arrays and releases dynamic-array storage space. But if

the
array is empty, there is no need to clear it is there not?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in message
...
hi
is there any way to erase array elements having no values stored in

it?
"if len(array(a,b))<=0 then erase"
will this work?
thanks
--
hemu








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default earasing arrays

So where do you need to clear it? Does erase not work fine?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in message
...
hi bob
if not len(atrray(n)<=0 then
s.writeline array(n)
end if
this code worked fine
thanks
--
hemu


"Bob Phillips" wrote:

can you show us the code?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in message
...
hi Bob
i'm using writline method to put array containts in text file
But while collecting data some lines in other text files are blank
which are stored in an array
so again while writing to new txt file these lines get written angain
therefor i want to delete or erase empty elements in an array
please help
--
hemu


"Bob Phillips" wrote:

The code you show does not demonstrate that the array has no values

in
it,
it is just testing a particular element of the array.

Erase clears an array down, or as help puts it, Reinitializes the

elements
of fixed-size arrays and releases dynamic-array storage space. But

if
the
array is empty, there is no need to clear it is there not?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Hemant_india" wrote in

message
...
hi
is there any way to erase array elements having no values stored

in
it?
"if len(array(a,b))<=0 then erase"
will this work?
thanks
--
hemu








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
Arrays David Excel Discussion (Misc queries) 2 May 12th 09 10:16 PM
Avg Arrays PAL Excel Worksheet Functions 2 February 13th 09 06:02 PM
Use of arrays DKS Excel Worksheet Functions 1 November 30th 06 08:38 PM
arrays TheIrishThug[_9_] Excel Programming 1 December 21st 05 01:10 AM
Arrays Tobro88 Excel Discussion (Misc queries) 3 November 18th 05 11:28 PM


All times are GMT +1. The time now is 01:50 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"