+ Reply to Thread
Results 1 to 2 of 2

variant to integer format?

  1. #1
    James Cornthwaite
    Guest

    variant to integer format?

    Hi


    For the times when variant contains an integer, how do i convert it to
    integer type?

    is it some thing like?
    ......................
    dim varies As Variant
    dim x As integer

    if i know varies contains an integer value
    x = integer(varies)

    Also can a function which is said to return a variant, return an integer
    type and the cell calling the function display an integer type or will just
    appear as a variant type. I know a variant has no specific type but does
    this mean it can accept various types and which are then tread as the
    original type or is variant a type in itself, rather than a variable which
    can be a variety of types?

    Many thanks
    James



  2. #2
    AA2e72E
    Guest

    RE: variant to integer format?

    Try:

    x = Cint(varies)


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1