Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single Data Type: Empty or Zero?

Status
Not open for further replies.

Ca1icoJack

IS-IT--Management
Nov 27, 2008
36
GB
I have created a library similar to:
_________________________________________________________
Public Type SECTION

Angle as Single

End Type

Public Type BLADE

Section(17) as SECTION

End Type

Public My_Blade as Blade
______________________________________________________

The number of sections can vary between approximately 6 and 17. Sometimes the values for the Angle can be equal to 0.

When this data is input into another spreadsheet I want the values equal to 0 to be input but the unfilled variables to not be input.

e.g. if there are 7 angles and angle 3 is zero; I want angles 1 to 7 to be entered and subsequent values ignored.

However, since an empty value is also equal to 0 it does not seem to be able to differentiate between the two.

Any ideas?

Sorry for the poor explanation, I can't really figure out how to explain it more clearly though.

Thanks very much
 
since an empty value is also equal to 0
You may consider to use Variant which can hold Null value.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Change the Single to Variant.

BTW, there is no datatype of SECTION.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
That was embarrassingly simple... Thanks very much

What do yuo mean by no Datatype?
 
Changing to single as Variant doesn't work since it says:

"Fixed or static data cannot be larger than 64k"

There are 17 variants for 18 points on 24 objects...
 
I see Type SECTION. Sorry [blush]

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip, the Section type is declared at the start of the posted code.

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top