+ Reply to Thread
Results 1 to 14 of 14

Meaning of vba line

  1. #1
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Meaning of vba line

    Hi,

    trying to learn more about VBA coding could anyone please tell me what this line means:

    Please Login or Register  to view this content.
    I have a search listbox when double click should open a UserForm1 with the vendor information but giving this error (attching picture of the error) and highlight the above line of code guess what I am stuck object "TextBox"

    here is complete code:specific object.PNG

    Please Login or Register  to view this content.
    Thank you

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: Meaning of vba line

    Maybe
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Meaning of vba line

    thank you.

    getting same error (attaching sample of file).
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: Meaning of vba line

    You don't have a listbox on userform1.

  5. #5
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Meaning of vba line

    Attachment 784724

    Yes, I do. (attached)

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: Meaning of vba line

    That attachment comes back as invalid.
    However I can assure you that Userform1 does not have any listboxes.

  7. #7
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Meaning of vba line

    Sorry, yes, right doesn't.

    how can I fix it.

  8. #8
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Meaning of vba line

    here is a sample of the file:

    https://app.box.com/s/e8uq0ddtpwqq48ixayxeumddzcg458sx

    thank you,

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: Meaning of vba line

    I don't understand, you cannot loop through a non existent listbox

  10. #10
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Meaning of vba line

    When I double click to open the UserForm1 with the vendor information wont' open and give the error noted earlier.

    Thank you,

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,068

    Re: Meaning of vba line

    But what are you double clicking on? There is no listbox in Userform1 & your code does not open anything.

  12. #12
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Meaning of vba line

    Forgive my English guess haven't explained it well.

    I have Search_Forms and the middle has listbox calls results2 here is a picture, when search display vendor in listbox so I want to double click to open another userform called "UserForm1".
    Attachment 784752

  13. #13
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,203

    Re: Meaning of vba line

    Josros, first of all you have too much clutter in your code. You have carelessly renamed the controls in the forms, but you have not taken care to rename them in the code. There are also lines of code that have incorrect syntax. In the ThisWorkbook module, you have a procedure that has the same name as one of the forms (UserForm1). Rename the procedure for example to LoadForm1. In general, do not run code that does not compile. After significant changes, always use the Debug/Compile VBAProject menu.
    Please put your code in order so that at least compilation is possible, and then:
    1. In the Search_Form module, in the Results1_DblClick procedure, fix the line to
    Please Login or Register  to view this content.
    .
    2. In the Search_Forms module, in the Results2_DblClick procedure, change the line to
    Please Login or Register  to view this content.
    .

    Artik

  14. #14
    Forum Contributor
    Join Date
    11-05-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    149

    Re: Meaning of vba line

    Thank you for all your help and suggestions.

    I did compile and cleaned up the codes.

    question I did the changes you suggested above still same error in Results2, Results1 worked good.

    think the problem I am confused think that's where the problem is need to understand this
    Please Login or Register  to view this content.
    What is it cannot find any field or textbox named like that, weird that in Result1 works open the form User_Form when I dbl click in Search_Form but Results 2
    when I dbl click in Search_Forms won't work.

    thanks again.

+ 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. [SOLVED] meaning of the code
    By chubbychub in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-28-2016, 04:02 PM
  2. [SOLVED] Can you please tell me what is the meaning of =+A1*B1 vs =A1*B1
    By Novice_To_Excel in forum Excel General
    Replies: 4
    Last Post: 03-07-2015, 01:24 PM
  3. #REF! Meaning
    By este994 in forum Excel General
    Replies: 1
    Last Post: 08-18-2011, 10:23 AM
  4. Meaning of E
    By Ganivada in forum Excel General
    Replies: 2
    Last Post: 11-27-2009, 11:09 AM
  5. meaning of % character?
    By dlh in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2008, 01:07 AM
  6. [SOLVED] meaning of #########
    By dick in forum Excel General
    Replies: 2
    Last Post: 01-10-2006, 09:30 AM
  7. The meaning and uses for ans
    By Pat in forum Excel General
    Replies: 3
    Last Post: 04-04-2005, 06:06 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