+ Reply to Thread
Results 1 to 2 of 2

Compile Error: Expected Function or variable

  1. #1
    Registered User
    Join Date
    03-20-2020
    Location
    Portugal
    MS-Off Ver
    18.2002.1101.0
    Posts
    5

    Compile Error: Expected Function or variable

    Hello,
    I'm new to VBA and i keep getting this error. This seems very easy, but i can't figure it out

    Please Login or Register  to view this content.
    The idea is when i click the Add button that the info in TextBoxes pass to the ListBox


    Best regards

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,908

    Re: Compile Error: Expected Function or variable

    First, you should fix peso = TextBox2.Value

    Textbox always returns string. Regardless of what's stored in it.

    Then to add item to multi column list. You'd first add Item then set value for elements.

    So something like below.

    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Getting compile error expected function or variable
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2014, 01:33 AM
  2. [SOLVED] Shell Function "Compile Error: Expected procedure, not variable"
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-09-2014, 01:20 PM
  3. [SOLVED] Compile error: Expected Fuction or variable
    By BuenosDias in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2014, 09:25 AM
  4. [SOLVED] Compile Error Expected Function or Variable
    By shiser in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-22-2014, 09:18 AM
  5. [SOLVED] Compile error expected function or variable (on protect method)
    By Tirren in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2013, 03:22 PM
  6. Mac issue (please help) "Compile error: Expected Function or variable"
    By m1notaur in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-22-2011, 06:00 PM
  7. Compile Error:- expected function or variable problem
    By skin.uk1 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-08-2011, 02:56 PM

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