+ Reply to Thread
Results 1 to 14 of 14

Have a Run Time error??

  1. #1
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Have a Run Time error??

    Hi All,

    When I clear the information from my Userform I get a "Run Time Code" error. I don't have any problems initially, only when I clear my userform
    and re-input data. Its been working fine until now?

    I have this in the module:

    Please Login or Register  to view this content.


    and this in the UserForm:


    Please Login or Register  to view this content.
    Any Thoughts?

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Have a Run Time error??

    Some indication of where the error occurs and the error number would help.

    At a guess it'd be setting the combobox text - but I could be wrong...

  3. #3
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Have a Run Time error??

    Toggle breakpoint at the beginning of Clear sub and then test it step-by-step

  4. #4
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Have a Run Time error??

    Got this, which I picked up from breakpoint Toggle Too. It's a RunTime error 13
    Attached Images Attached Images

  5. #5
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Have a Run Time error??

    You are trying to multiply string with number?

  6. #6
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Have a Run Time error??

    Yes, the TextBox47.Value represents a Quantity, which changes so I can't put a numerical value in the code?

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Have a Run Time error??

    As before, use
    Please Login or Register  to view this content.
    You might also consider using a variable to prevent events from running when you are performing actions like clearing the form.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  8. #8
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Have a Run Time error??

    Should i put:

    Please Login or Register  to view this content.
    instead of:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Have a Run Time error??

    Should i put:

    Please Login or Register  to view this content.
    instead of:

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Have a Run Time error??

    You beat me to it!!!! i was a bit delayed but it dawned on me the problem!! Thanks All

  11. #11
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Have a Run Time error??

    Yes, in case you want to use value of this textbox as number

  12. #12
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Have a Run Time error??

    No, you do not (and can not) use Val on the left side of the assignment.

  13. #13
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Have a Run Time error??

    I've de-bugged the whole lot. Lots of areas where I'd failed to put Val in front of TextBox. Works great now. I can clear my form and re-input data fine

  14. #14
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Have a Run Time error??

    Thanks everyone

+ 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] Error message: Run-Time error '1004 '; application-defined or object-defined error
    By Davasu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2015, 06:52 AM
  2. Replies: 1
    Last Post: 10-22-2015, 05:50 AM
  3. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  4. Cannot Publish Excel Pivot Chart - Run Time Error
    By crisb184 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2013, 07:04 AM
  5. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  6. run-time error ;2147023179 (800706b5) time automation error interface unknown
    By karthik72 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2012, 09:31 AM
  7. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM

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