+ Reply to Thread
Results 1 to 3 of 3

Code "debug" error msg

  1. #1
    Registered User
    Join Date
    02-20-2009
    Location
    Mineral, VA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Code "debug" error msg

    The two code extracts below are associated with two separate worksheets in the same workbook. They work fine. They simply are used to assign either a PO# or a Temp Unit #, located in a third sheet, in their respective sheets.

    The problem is that when I'm in either the Master or the Work Orders sheets where these two codes are used, and I do something simple like drag down some values or paste something in a cell, I get the "Run time error "13" type mismatch error" in the popup debug window for my VBA code. And in each case, it highlights the codeline I've color coded below:

    Work Orders Code:
    Please Login or Register  to view this content.
    Master Code
    Please Login or Register  to view this content.
    My problem is I'm so new to this type of coding that I'm totally lost as to what it is really telling me or what to do. It doesn't keep me from doing what I need to do nor does it interfere with what the code does..I just don't know how to fix it.

    I've attached the sample spreadsheet.
    Attached Files Attached Files
    Last edited by cedarhill; 05-29-2009 at 05:27 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Code "debug" error msg

    If you uncomment out those first lines, it will probably stop doing that. By having the the apostrophe it turns the first line of code OFF (you see it as green text in the editor).

    Take out the apostrophes. See if it behaves better.

    You should also avoid copy or dragging across those columns that have the macros watching them anyway.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-20-2009
    Location
    Mineral, VA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Code "debug" error msg

    Thank you. Your suggestion solved the problem.

+ 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