+ Reply to Thread
Results 1 to 7 of 7

Type Mismatch Error in Data Entry Form

  1. #1
    Registered User
    Join Date
    01-31-2016
    Location
    San Jose, CA
    MS-Off Ver
    2010
    Posts
    4

    Type Mismatch Error in Data Entry Form

    Hi All,

    I'm new to vba coding and I've created a worksheet that prompts users to enter SN information and want it to check if the SN is duplicated when entered but keep getting a type mismatch error when trying to compile my code. SN is in this format "FRHY-012016069" and worksheet attached
    Please Login or Register  to view this content.
    Copy of Twitter Rack Switch and ATS Info.xls

  2. #2
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,207

    Re: Type Mismatch Error in Data Entry Form

    DCount is expecting ranges as its arguments.

    If you could attach a sample worksheet, so we can see what Rack SN, RackInfo are we could suggest other approaches.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    01-31-2016
    Location
    San Jose, CA
    MS-Off Ver
    2010
    Posts
    4

    Re: Type Mismatch Error in Data Entry Form

    Quote Originally Posted by mikerickson View Post
    DCount is expecting ranges as its arguments.

    If you could attach a sample worksheet, so we can see what Rack SN, RackInfo are we could suggest other approaches.
    I attached the workbook to the first post. Did it not show up?

    Thanks

  4. #4
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,207

    Re: Type Mismatch Error in Data Entry Form

    I added a Named Range Rack_SN_HeaderCell.
    Please Login or Register  to view this content.
    Although you might want to not use the name and use
    Please Login or Register  to view this content.
    By the way, the use of font size of 8 throughout the user form makes it almost impossible to use for anyone over 40 and a great strain for anyone else.

  5. #5
    Registered User
    Join Date
    01-31-2016
    Location
    San Jose, CA
    MS-Off Ver
    2010
    Posts
    4

    Re: Type Mismatch Error in Data Entry Form

    Quote Originally Posted by mikerickson View Post
    I added a Named Range Rack_SN_HeaderCell.
    Please Login or Register  to view this content.
    Although you might want to not use the name and use
    Please Login or Register  to view this content.
    By the way, the use of font size of 8 throughout the user form makes it almost impossible to use for anyone over 40 and a great strain for anyone else.
    How did you add the named data range?

    Thanks

  6. #6
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,207

    Re: Type Mismatch Error in Data Entry Form

    The Add Name feature. It from the Insert>>Name>>Define menu on my Mac. On a Windows version, I think its on the Formula ribbon..

  7. #7
    Registered User
    Join Date
    01-31-2016
    Location
    San Jose, CA
    MS-Off Ver
    2010
    Posts
    4

    Re: Type Mismatch Error in Data Entry Form

    Quote Originally Posted by mikerickson View Post
    The Add Name feature. It from the Insert>>Name>>Define menu on my Mac. On a Windows version, I think its on the Formula ribbon..
    Got everything working now. Thanks for your help.

+ 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] Combo Box in User Form gives a Type Mismatch Error
    By Rudidw in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2015, 05:31 AM
  2. type mismatch Error when writing data to excel
    By svibuk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2013, 07:07 AM
  3. type mismatch error in form code
    By jay11 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2010, 02:25 PM
  4. Type Mismatch Error on Large Data Sets
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2010, 04:40 PM
  5. Type mismatch error on form show
    By Darach in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2005, 08:05 AM
  6. type mismatch error-copies data from one sheet to another
    By Marcotte A in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2005, 10:25 PM
  7. [SOLVED] Type Mismatch Error when getting data from another workbook
    By Tony Zappal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-12-2005, 07: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