Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default document for VBA

dear members of group
I am moving to work with VBA and I dont know where can i have defintion
and help for function/variable type that I find in VBA. When I use help
of VBA editor (included in Excel for example) I could not find proper
definition of Variant type. Could you help me with that?
XS

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default document for VBA

This is what they have in help:
Variant Data Type
The Variant data type is the data type for all variables that are not
explicitly declared as some other type (using statements such as Dim,
Private, Public, or Static). The Variant data type has no type-declaration
character.

A Variant is a special data type that can contain any kind of data except
fixed-length String data. (Variant types now support user-defined types.) A
Variant can also contain the special values Empty, Error, Nothing, and Null.
You can determine how the data in a Variant is treated using the VarType
function or TypeName function.

Numeric data can be any integer or real number value ranging
from -1.797693134862315E308 to -4.94066E-324 for negative values and from
4.94066E-324 to 1.797693134862315E308 for positive values. Generally,
numeric Variant data is maintained in its original data type within the
Variant. For example, if you assign an Integer to a Variant, subsequent
operations treat the Variant as an Integer. However, if an arithmetic
operation is performed on a Variant containing a Byte, an Integer, a Long,
or a Single, and the result exceeds the normal range for the original data
type, the result is promoted within the Variant to the next larger data
type. A Byte is promoted to an Integer, an Integer is promoted to a Long,
and a Long and a Single are promoted to a Double. An error occurs when
Variant variables containing Currency, Decimal, and Double values exceed
their respective ranges.

You can use the Variant data type in place of any data type to work with
data in a more flexible way. If the contents of a Variant variable are
digits, they may be either the string representation of the digits or their
actual value, depending on the context. For example:

Dim MyVar As Variant
MyVar = 98052
In the preceding example, MyVar contains a numeric representation-the actual
value 98052. Arithmetic operators work as expected on Variant variables that
contain numeric values or string data that can be interpreted as numbers. If
you use the + operator to add MyVar to another Variant containing a number
or to a variable of a numeric type, the result is an arithmetic sum.

The value Empty denotes a Variant variable that hasn't been initialized
(assigned an initial value). A Variant containing Empty is 0 if it is used
in a numeric context and a zero-length string ("") if it is used in a string
context.

Don't confuse Empty with Null. Null indicates that the Variant variable
intentionally contains no valid data.

In a Variant, Error is a special value used to indicate that an error
condition has occurred in a procedure. However, unlike for other kinds of
errors, normal application-level error handling does not occur. This allows
you, or the application itself, to take some alternative action based on the
error value. Error values are created by converting real numbers to error
values using the CVErr function.



-----------------------



type variant in a module, highlight it and hit F1.



--

Regards,

Tom Ogilvy



wrote in message
oups.com...
dear members of group
I am moving to work with VBA and I dont know where can i have defintion
and help for function/variable type that I find in VBA. When I use help
of VBA editor (included in Excel for example) I could not find proper
definition of Variant type. Could you help me with that?
XS



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default document for VBA

can you show me how can I get this help?
Do you know how to assign a name locally to a range in a sheet. I know
how to do it globally with Insert-Name-Define but dont know how to
define a local name for a range.
XS

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default document for VBA

At the end of the post I said

in a module put in

variant

highlight it and hit F1

--------------

Insert = Name = Define

when you assign the name, use the sheet name as well

name: Sheet1!MyName
Refersto: =Sheet1!$A$1:$A$10

as an example.

--
Regards,
Tom Ogilvy

wrote in message
oups.com...
can you show me how can I get this help?
Do you know how to assign a name locally to a range in a sheet. I know
how to do it globally with Insert-Name-Define but dont know how to
define a local name for a range.
XS



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default document for VBA

thank very much,
it seem that our News-Connected distribution are strongly correlated.
Thank for this help!
XS



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default document for VBA

Now, the inverse question: how can I remove a name that I ve created? I
can find how to do it
XS

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
convert excel document to word document (not a picture) frendabrenda1 Excel Discussion (Misc queries) 2 October 6th 06 03:55 PM
How to create a formatted 'readable' document based on Excel document? [email protected] Excel Discussion (Misc queries) 0 June 23rd 06 06:09 PM
how do i rotate a document or print small document on envelope crystal New Users to Excel 2 March 23rd 06 03:52 PM
I lost a document in excel, the whole document disappeared Excel Document Gone SSW Excel Discussion (Misc queries) 1 November 18th 05 01:25 AM
How do I convert Word document into an Excel document? Jamie Excel Discussion (Misc queries) 3 April 7th 05 09:45 PM


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"