+ Reply to Thread
Results 1 to 17 of 17

Type Mismatch Runtime Error 13

  1. #1
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Type Mismatch Runtime Error 13

    Hi Guys,
    I'm new to this forum. Also a newbie in Excel/VBA.
    I'm trying to create a "search-engine like" on Excel with compiled process updates of our work.
    I used, auto suggest search engine and userform to view the image. It's quite difficult and needs a lot of work since I have to put Userform every updates we get.
    Whenever the mouse is dragged to 2 or more cells I alwasys get this error Type Mismatch Run time error 13. Please help me with this one. I'll appreciate it. Thank you.


    VBA:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    If Selection.Value = "Matching new professions" Then
    frmMNP.Show

    ElseIf Selection.Value = "New Dentists specialty" Then
    frmNDS.Show
    ElseIf Selection.Value = "OH Nurse SLN" Then
    frmONS.Show
    ElseIf Selection.Value = "Disabled Dentists SLN" Then
    frmDDS.Show
    ElseIf Selection.Value = "CSP Instructions" Then
    frmCSPI.Show
    ElseIf Selection.Value = "Nevada Nurses" Then
    frmNN.Show
    ElseIf Selection.Value = "Florida Pharmacists Interns" Then
    frmFPI.Show
    ElseIf Selection.Value = "Nevada Nurses and expired SLN" Then
    frmNNES.Show
    ElseIf Selection.Value = "South Carolina Optometrists SLN" Then
    frmSCOS.Show
    ElseIf Selection.Value = "California SLN" Then
    frmCS.Show

  2. #2
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Type Mismatch Runtime Error 13

    TEST5.xlsmTEST5.xlsm

    This is the actual file. please please help me.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Type Mismatch Runtime Error 13

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Type Mismatch Runtime Error 13

    Quote Originally Posted by shg View Post
    Please Login or Register  to view this content.
    Thank you so much sir!
    But do you think I can do it more easier on the part where I code one by one?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Type Mismatch Runtime Error 13

    Pardon ?

  6. #6
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Type Mismatch Runtime Error 13

    Hi,

    I have a follow up question.
    I'm done with my project "search engine"
    However, some of my Topics doesn't show their userform e.g. New York SLN

    Please anyone can help? Sir SHG. Pls help.
    I can't add the file is exceeds the limit size.


    Thank you.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Type Mismatch Runtime Error 13

    some of my Topics doesn't show their userform e.g. New York SLN
    Pardon ?

  8. #8
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Type Mismatch Runtime Error 13

    Some userform doesn't show.
    e.g. New York SLN.
    90% of my userforms are working.


    Here's the code:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Select Case Target(1).Value
    Case "Matching new professions"
    UF1.Show
    Case "New Dentists specialty"
    UF2.Show
    Case "OH Nurse SLN"
    UF3.Show
    Case "Disabled Dentists SLN"
    UF4.Show
    Case "CSP Instructions"
    UF5.Show
    Case "Nevada Nurses"
    UF6.Show
    Case "Florida Pharmacists Interns"
    UF7.Show
    Case "Nevada Nurses and expired SLN"
    UF8.Show
    Case "South Carolina Optometrists SLN"
    UF9.Show
    Case "California SLN"
    UF10.Show
    Case "California Psychologists SLN"
    UF11.Show
    Case "Co Mingled Records"
    UF12.Show
    Case "Adding DO and MD SLN"
    UF13.Show
    Case "AL02 Keys"
    UF14.Show
    Case "Naturopathic Doctor Utah"
    UF15.Show
    Case "New SLN Business Rule"
    UF16.Show
    Case "DVC 49 Can not validate Specialty w/ notes"
    UF17.Show
    Case "DVC 49 Can not validate Specialty and SLN"
    UF18.Show
    Case "Back Button"
    UF19.Show
    Case "New prescriber with retired Status"
    UF20.Show
    Case "Wyoming Physician Assitant SLN Formats"
    UF21.Show
    Case "New York SLN"
    UF22.Show
    Case "Reactivating Records1"
    UF23.Show
    Case "Verifying Healthcare Administrator"
    UF24.Show
    Case "05 Exception"
    UF25.Show
    Case "South Dakota SLN"
    UF26.Show
    Case "Louisiana Optometrist"
    UF27.Show
    Case "NC Social Worker Associate"
    UF28.Show
    Case "New Jersey Dentist"
    UF29.Show
    Case "What Record To Keep"
    UF30.Show
    Case "Alabama Controlled Substances"
    UF31.Show
    Case "Closed License Types"
    UF32.Show
    Case "House Physician"
    UF33.Show
    Case "DPA & TPA Certified"
    UF34.Show
    Case "Conneticut Advance Nurse Independent Practice"
    UF35.Show
    Case "Alabama Nurse Temporary Approval"
    UF36.Show
    Case "Dea Address ON the Gray Field"
    UF37.Show
    Case "Non Boardering State"
    UF38.Show
    Case "Searching Address"
    UF39.Show
    Case "Home and Unspecified Address"
    UF40.Show
    Case "Student Specialty"
    UF41.Show
    Case "No RXU"
    UF42.Show
    Case "Deleting Duplicate Address"
    UF43.Show
    Case "Anesthesiology Critical Care Med"
    UF44.Show
    Case "California Pharmacy Technician"
    UF45.Show
    Case "Inactive ISNs"
    UF46.Show
    Case "Missiong Ohio RN SLN"
    UF47.Show
    Case "MD and DO Profession"
    UF48.Show
    Case "Ohio RN SLN"
    UF49.Show
    Case "SLN with Past Expiry Dates"
    UF50.Show
    Case "SLN with Same Names and Can Not Be Verify"
    UF51.Show
    Case "California Therapists Licenses"
    UF52.Show
    Case "Counselor to Social Worker"
    UF53.Show
    Case "AR SLN Not Maintained"
    UF54.Show
    Case "Tracking Boxes for Duplicate Record"
    UF55.Show
    Case "Tracked Through Prior Address"
    UF56.Show
    Case "Incorrect Information on Sources"
    UF57.Show
    Case "Primary Office Vs Full Validation"
    UF58.Show
    Case "Addresses with Uncertain Address Type"
    UF59.Show
    Case "New Instructions on Phone Validation"
    UF60.Show
    Case "LA SLN for Psychologists"
    UF61.Show
    Case "MS Optometrist Therapeutic Number"
    UF62.Show
    Case "Future Date ISN"
    UF63.Show
    Case "Provider Affiliations"
    UF64.Show
    Case "Multiple SLNs"
    UF65.Show
    Case "CA Nursing Format"
    UF66.Show
    Case "Unusual Address"
    UF67.Show
    Case "Validating RN SLN"
    UF68.Show
    Case "Matching on Inactive ISN"
    UF69.Show
    Case "Home Address"
    UF70.Show
    Case "Physician Medical Assistant"
    UF71.Show
    Case "NC Nursing SLN"
    UF72.Show
    Case "Tracking Boxes"
    UF73.Show
    Case "Full Validation and V Button"
    UF74.Show
    Case "Texas APRN1"
    UF75.Show
    Case "Deactivating Record"
    UF76.Show
    Case "Contact Affiliations"
    UF77.Show
    Case "New Prescriber from Internet"
    UF78.Show
    Case "Phone Numbers"
    UF79.Show
    Case "Reactivating Records2"
    UF80.Show
    Case "DEA Address"
    UF81.Show
    Case "WV School Psychologist"
    UF82.Show
    Case "Multiple SLN Psychologist"
    UF83.Show
    Case "Maryland Chiropractor SLN"
    UF84.Show
    Case "Speech Language Pathologist"
    UF85.Show
    Case "Same Names"
    UF86.Show
    Case "WI MD SLN same Privilege"
    UF87.Show
    Case "CA Optometrist SLN"
    UF88.Show
    Case "Presume Dead Status"
    UF89.Show
    Case "RI Dentist SLN"
    UF90.Show
    Case "Postgraduate Physician Trainee"
    UF91.Show
    Case "Incorrect SLN"
    UF92.Show
    Case "SLN same Privilege"
    UF93.Show
    Case "Address Verification"
    UF94.Show
    Case "NC Dentist SLN"
    UF95.Show
    Case "PA Prescriptive Auth"
    UF96.Show
    Case "MN Multiple License Data Error"
    UF97.Show
    Case "Adding MO SLN"
    UF98.Show
    Case "IA SLN Format"
    UF99.Show
    Case "Status from SLN Sites"
    UF100.Show
    Case "Note for Phone Validation"
    UF101.Show
    Case "IA MD SLN Format"
    UF102.Show
    Case "New Business Rule"
    UF103.Show
    Case "Expired SLN"
    UF104.Show
    Case "ID Optometrist SLN Format"
    UF105.Show
    Case "ID MD SLN Format"
    UF106.Show
    Case "Matching"
    UF107.Show
    Case "NC Dental SLN"
    UF108.Show
    Case "Prior Address"
    UF109.Show
    Case "Reactivating Records3"
    UF110.Show
    Case "IA MD SLN Format2"
    UF111.Show
    Case "MN Nurse SLN Site"
    UF112.Show
    Case "Sub Specialty"
    UF113.Show
    Case "Name with No Address"
    UF114.Show
    Case "Incorrect FL SLN"
    UF115.Show
    Case "QA Guidelines"
    UF116.Show
    Case "Oral Maxillofacial Surgery"
    UF117.Show
    Case "Texas APRN and RX"
    UF118.Show
    Case "New SLN Keys"
    UF119.Show
    Case "Tracking"
    UF120.Show
    Case "Searching for a Prescriber"
    UF121.Show
    Case "2 NPI"
    UF122.Show
    Case "Validating SLN"
    UF123.Show
    Case "New Prescriber Records"
    UF124.Show
    Case "OH Nurse SLNs"
    UF125.Show
    Case "Birth Year"
    UF126.Show
    Case "CSP Test"
    UF127.Show
    Case "AZ06 APRN"
    UF128.Show
    Case "NJ01 and 02 Permits"
    UF129.Show
    Case "TX06 SLN"
    UF130.Show



    End Select
    End Sub
    Attached Images Attached Images

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Type Mismatch Runtime Error 13

    Maybe there's a leading or trailing space in the cell. What happens when you step through the code?

  10. #10
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Type Mismatch Runtime Error 13

    Hey Man,

    hard to say what is the problem without the Sheet.
    Make a debug print when you click the text

    Please Login or Register  to view this content.
    then you can copy the text of New York SLN from immediat Window to the Function to exclude Typo and blanks

    Also i have a Question to your Project.
    Is it all just Pictures that you Put in your Userform?

    Greets
    Loki

  11. #11
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Type Mismatch Runtime Error 13

    Quote Originally Posted by shg View Post
    Maybe there's a leading or trailing space in the cell. What happens when you step through the code?
    Thanks Sir, what I did. I just retyped it from its code and cell itself and its working fine now. Thank you so much sir!

  12. #12
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Type Mismatch Runtime Error 13

    Quote Originally Posted by LordLoki View Post
    Hey Man,

    hard to say what is the problem without the Sheet.
    Make a debug print when you click the text

    Please Login or Register  to view this content.
    then you can copy the text of New York SLN from immediat Window to the Function to exclude Typo and blanks

    Also i have a Question to your Project.
    Is it all just Pictures that you Put in your Userform?

    Greets
    Loki
    Hi Sir, Its working now.
    And YES its all pictures. Its like a compilation of queries to our process.
    So all I can do for now is to put some images using userform once they have queries.

    Tho, I'm very much open for suggestion on how to improve this. I also would like to know on how can I put real time date to when this userform was added.

  13. #13
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Type Mismatch Runtime Error 13

    Hi Excelbench,

    I created a little File that maybe is an Alternative for your.
    I Assumed that everyone has access to the Excelfolder and that you only use images for the news

    So i added a folder Pictures where you can put all the Pictures that you wanna show and name them like you would name the Entry on your "Database"
    Then when the User opens the File he gets the Userform and it loads all the Image Names into a Listbox
    When the user Clicks an Entry the Script opens another (empty) userform and sets the Background image to the Selected File
    I also added a self resize in the userform with a max size of 800x600 (can be adjusted)
    Important is that the Pictures can only be in BMP GIF or JPG Format

    Check it out and let me know if it works for you.
    Just download the Zip File and unpack the folder and Excel in the same location.
    I already added some test pictures that i got from your file.

    I think it saves you a lot of work

    for everybody that just wants to look at the Code:

    This all goes in the Userform "Main_Form"
    you also need a blank userform called "ShowImg"

    Please Login or Register  to view this content.
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Type Mismatch Runtime Error 13

    Quote Originally Posted by LordLoki View Post
    Hi Excelbench,

    I created a little File that maybe is an Alternative for your.
    I Assumed that everyone has access to the Excelfolder and that you only use images for the news

    So i added a folder Pictures where you can put all the Pictures that you wanna show and name them like you would name the Entry on your "Database"
    Then when the User opens the File he gets the Userform and it loads all the Image Names into a Listbox
    When the user Clicks an Entry the Script opens another (empty) userform and sets the Background image to the Selected File
    I also added a self resize in the userform with a max size of 800x600 (can be adjusted)
    Important is that the Pictures can only be in BMP GIF or JPG Format

    Check it out and let me know if it works for you.
    Just download the Zip File and unpack the folder and Excel in the same location.
    I already added some test pictures that i got from your file.

    I think it saves you a lot of work

    for everybody that just wants to look at the Code:

    This all goes in the Userform "Main_Form"
    you also need a blank userform called "ShowImg"

    Please Login or Register  to view this content.
    Hi Sir,

    I think this can really help when it terms to importing images and typing code every entry.
    I downloaded the 2 files in one folder. Enter the codes.

    But I think I'm missing something. No pictures showing up.

  15. #15
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Type Mismatch Runtime Error 13

    What happens Exactly?

    1. Do you see the Main Userform when you start the exel?
    2. is the List empty or do you see the Entrys from the Picture folder
    3. when you select an entry (if they are there) does a second userform pop up or does nothing happen?

    Greets Loki

  16. #16
    Forum Contributor
    Join Date
    03-23-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2016
    Posts
    201

    Re: Type Mismatch Runtime Error 13

    Quote Originally Posted by LordLoki View Post
    What happens Exactly?

    1. Do you see the Main Userform when you start the exel?
    2. is the List empty or do you see the Entrys from the Picture folder
    3. when you select an entry (if they are there) does a second userform pop up or does nothing happen?

    Greets Loki

    I only see the main userform.
    everything else none.

  17. #17
    Forum Contributor
    Join Date
    04-20-2015
    Location
    Switzerland
    MS-Off Ver
    2010
    Posts
    312

    Re: Type Mismatch Runtime Error 13

    Add a screenshot of what you see please

+ 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. Runtime error 13 - type mismatch
    By Polluz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2014, 11:30 PM
  2. RunTime Error 13: Type MIsmatch
    By tariq2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2013, 10:47 AM
  3. [SOLVED] runtime error 13 type mismatch
    By chappie in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-30-2012, 10:12 PM
  4. Runtime Error 13 Type Mismatch
    By vtsoldier2010 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2012, 12:59 PM
  5. Runtime Error '13': Type mismatch
    By Linking to specific cells in pivot table in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2005, 03: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