Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Set array element to empty

I have an array that is type single and I would like to delete values that
meet a certain criteria. If the array was variant I could set the a
particular array element to "". How do I do something similar for an array
that is not variant?

Thanks,
Raul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Set array element to empty

Hi Raul,

A Single does not have an "empty" value. Its initial value is 0. So the
best you can do is set its value to 0 when you want to "clear" it. So, in
your case, you may want to either 1) use a Variant array and set the values
to be cleared to vbNullString (or ""); or 2) use a Single array as the
source, and create a new Single array, copying only the values you need from
the source array.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Set array element to empty

Thanks a bunch for the quick and informative respsonse! In this case I'll go
with option 1.

Thanks again,
Raul

"Jake Marx" wrote:

Hi Raul,

A Single does not have an "empty" value. Its initial value is 0. So the
best you can do is set its value to 0 when you want to "clear" it. So, in
your case, you may want to either 1) use a Variant array and set the values
to be cleared to vbNullString (or ""); or 2) use a Single array as the
source, and create a new Single array, copying only the values you need from
the source array.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


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
Counting Array element asingh Excel Worksheet Functions 4 April 12th 10 03:30 PM
Permutations of an array element < to a value Bruce Excel Worksheet Functions 3 January 31st 06 05:00 PM
Further Array Element question S G Booth Excel Programming 2 February 25th 05 04:54 PM
Array element Andrea[_8_] Excel Programming 5 December 7th 04 09:24 PM
deleting array element michael Excel Programming 0 December 18th 03 09:55 PM


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