+ Reply to Thread
Results 1 to 4 of 4

Store value from an array in new variable

  1. #1
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Store value from an array in new variable

    Can someone explain why this piece of code works

    Please Login or Register  to view this content.
    But this doesnt:

    Please Login or Register  to view this content.
    I can't figure out how to store a value from the array in a new integer variable!

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Store value from an array in new variable

    Please Login or Register  to view this content.
    You only set objects, an integer isn't an object, also you shouldn't really use function names as variable names, it makes excel confused val is a function
    Last edited by Kyle123; 06-19-2013 at 04:52 AM.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Store value from an array in new variable

    You are trying to set Val as object because SET used to assign objects. Just remove the Set and try

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Store value from an array in new variable

    Thanks guys!

+ 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