+ Reply to Thread
Results 1 to 4 of 4

Error. Variable Required

  1. #1
    Registered User
    Join Date
    05-14-2008
    Posts
    27

    Question Error. Variable Required

    Hello,

    I have a button in my WorkSheet that when clicked runs the function Play.
    I am getting the following error:

    "Variable Required - Can't Assign To this Expression"

    On the following code line:

    Initialize (game)

    What am I doing wrong?

    Thanks,
    Miguel

    Here is my code:
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 05-19-2008 at 02:40 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Shapper,

    When posting code samples, please remember to use Code Tags to retain the formatting of the code and make it easier to read.

    Sincerely,
    Leith Ross

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Shapper,

    There are 2 macro calls that are undefined in your code sample, so I could troubleshoot those (I commented them out). Using the Sub's Named Variable clears up this problem. The other change was to creating the Image names. Both changes are marked in red.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  4. #4
    Registered User
    Join Date
    05-14-2008
    Posts
    27
    Thank You!

    I forgot the code tags ... I am not use to post on this forums and on the forums I post it is a little bit different.

    I am to used to VB.NET and C# and it is not the first time I get this error when calling the function ... damm, I forgot it.

    Cheers,
    Miguel

+ 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