Results 1 to 10 of 20

Thread: Re: Defining multiple variables in VBA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Just some note to be going on with regarding the Variant.
    Variants holding other variables are not necessarily the same as those variables. Some examples that I have come across:
    Four things:

    _1)
    A String in a Variant has a fixed length . This has caught me out on occasions:
    http://www.eileenslounge.com/viewtop...=22512#p176056


    _2)
    We also see that some things "work" if housed in a Variant. An example I know about here is the passing of an Array() ByValue only "working" if that Array() is housed in a Variant.
    https://www.excelforum.com/developme...ml#post4381420
    This could suggest the thing is being held in a restricted way... It is suggested that the complex way ....that.... "...internal storage and ensuring that the types match so that the offsets are correct...."...
    https://www.mrexcel.com/forum/excel-...ml#post4336751
    is responsible for preventing this to "work" usually. Once again a reduced size, or size restriction could allow this to work.


    _3)
    The variable for an Object ( or for anything for that matter ) actually hold or is somehow referring to a "Pigeon Hole" which "points to" and includes information necessary to get at the actual data. ( I believe this is responsible for the vague idea of a Pointer in computing, which some Experts have tried to fool me into believing that they understand.. lol.. ). We can use a Variant in place of an Object, for Object declaration ( Diming ).
    The point I want to bring out here is that the variant used to "Hold" an Object is possibly big, but must not be a s massive as the Object itself

    _4)
    I am not quite sure of the relevance yet here
    Last edited by DocAElstein; 09-05-2019 at 02:48 PM.

Similar Threads

  1. Replies: 2
    Last Post: 02-27-2019, 05:35 PM
  2. VBA To Compare Multiple Cells
    By x010 in forum Excel Help
    Replies: 4
    Last Post: 08-31-2013, 01:53 AM
  3. Populate Ribbon Controls On Load Dynamically Through VBA Variables
    By phxpoolplayer in forum Excel Ribbon and Add-Ins
    Replies: 1
    Last Post: 04-20-2013, 01:51 AM
  4. Replies: 2
    Last Post: 12-19-2012, 08:28 AM
  5. Split Range into Multiple Columns VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 3
    Last Post: 03-07-2012, 10:53 PM

Posting Permissions

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