+ Reply to Thread
Results 1 to 26 of 26

'Run-time error '13', 'Type mismatch' in Range value

  1. #1
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Question 'Run-time error '13', 'Type mismatch' in Range value

    Hi, I hope someone can help me.

    I found the code below which I have tweaked to suit myself and it does send emails as I need but when I run the code it comes up with an error saying 'Run-time error '13', 'Type mismatch'. This error comes up with the highlighted line.

    Does anyone know what is causing this, as with being a novice I would't know were to start looking?

    Please Login or Register  to view this content.
    Last edited by zbor; 02-15-2016 at 07:26 AM. Reason: Title change

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: VBA coding help for Novice

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: VBA coding help for Novice

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  4. #4
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: VBA coding help for Novice

    Hi this is now changed as per your request

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: VBA coding help for Novice

    OK for code but also your post title should accurately and concisely describe your problem.

  6. #6
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: VBA coding help for Novice

    I wasn't sure what to put in the title is it ok now or does it need more info

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: VBA coding help for Novice

    Quote Originally Posted by jak68 View Post
    I wasn't sure what to put in the title
    Try think this way: If you want to google for solution what you would search for to find solution for your problem.
    Searching VBA error won't bring you closer.

    I'll fix it now for you to give you a clue so everyone can continue answering your question.

  8. #8
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Thanks

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    I think it should work.

    Are you referencing to a good sheet?
    This will work only in active sheet.

  10. #10
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    I am updating the sheet all the time at the minute with various bits of information, as I said the emailing function is working but then the error comes up when I run the code.

  11. #11
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    I can attach the whole spreadsheet if it makes it easier to figure out? Thanks

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Hmmm.. Sounds like you need to wait somewhere for some time...
    Can't say more without example workbook but you can try to test for your own:

    This will for example wait for 3 seconds.

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Hi is this to be put in at the start of the existing code or is it a separate code?

    I can attach the workbook if this does not work if it is easier...Thks

  14. #14
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    I show you above, I've put it between your code.

    Attaching workbook is always good idea.
    Make sure to remove all private informations and keep only what's important for your case.

  15. #15
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Hi, thanks for the reply

    The new coding made no difference so I tried to attach my workbook (which is work in progress) but it only opens a small box as below

    Any help is greatly appreciated

    Capture.JPG

  16. #16
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  17. #17
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    That's what I did and I only got the small box in the screenshot

    I managed to attach the screenshot ok but not a file attachment...strange

    I even tried it on a different type of computer

  18. #18
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    I will try to attach the file tonight from home as there might be something blocking the attachment from opening while I am in work (even though it worked attaching the screenshot)

  19. #19
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Yea.
    If not attach on some hosting and provide a link for download.

  20. #20
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Thanks for your help, out of curiosity what websites have you seen people hosting files from to be able to use the link option?

  21. #21
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Not many. Everyone upload in the Forum and that's the way we prefere

  22. #22
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Tried to attach the workbook last night and I had the same problem at home, it just comes up with the same small box. I tried using explorer, chrome and firefox..So I am stumped now

    I'll see if I can find a website that I can host the workbook so I can use a link instead of trying to upload

  23. #23
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    jak68
    Please Login or Register  to view this content.
    Most probably, you have Error value in Range("O" & x)?

  24. #24
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    I really don't know.
    When I click paperclip I got this window to upload attachment.
    EF.png

  25. #25
    Registered User
    Join Date
    01-21-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    Yeah... I found an error in some data I had hidden. I modified this and everything seems to be ok now.

    Next I will be trying to figure out how to get the macro to run automatically when I open the workbook

    Thanks for everyones help

  26. #26
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: 'Run-time error '13', 'Type mismatch' in Range value

    I've assumed that you will see error in a first place

+ 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] In need of help regarding combo box coding and button coding (Access form project)
    By mailblade in forum Access Tables & Databases
    Replies: 2
    Last Post: 01-09-2016, 01:34 AM
  2. macro coding help (i have no background in coding)
    By notgoodenough in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2014, 10:22 PM
  3. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-02-2013, 11:16 PM
  4. [SOLVED] Vb macro coding for transpose - complete coding?
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-02-2013, 05:04 AM
  5. [SOLVED] CheckBox coding to work with ComboBox coding
    By JimExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2013, 12:23 PM
  6. Coding and Reverse Coding a Questionnaire
    By lorr3 in forum Excel General
    Replies: 2
    Last Post: 11-18-2012, 06:43 PM
  7. Implant macro coding into ASP coding
    By Sam yong in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-15-2005, 06:05 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