+ Reply to Thread
Results 1 to 6 of 6

Runtime Error 13 .... Type Mismatch

  1. #1
    Registered User
    Join Date
    06-30-2014
    Location
    DFW AREA
    MS-Off Ver
    2003 & 2007
    Posts
    3

    Runtime Error 13 .... Type Mismatch

    Sub BEQUOTE()

    'Step 1 Copy the data
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    'Step 2 Open BE QUOTE FORM
    Please Login or Register  to view this content.
    'Step 3 Paste the data
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    'Step 4 Define Path Names and File Name
    Please Login or Register  to view this content.
    ‘Year, i.e. 2016’
    Please Login or Register  to view this content.
    ‘Month, i.e. K-OCT’
    Please Login or Register  to view this content.
    ‘Quote Number, i.e. X123456-XX’
    Please Login or Register  to view this content.
    ‘Customer Name, i.e. ABC Co.”
    Please Login or Register  to view this content.
    ‘Evaluates as 2016’
    Please Login or Register  to view this content.
    ‘Fails to Evaluate’
    Please Login or Register  to view this content.
    ‘Evaluates as X123456-XX’
    Please Login or Register  to view this content.
    ‘Evaluates as ABC Co.’
    'Step 5 Turn off application alerts
    Please Login or Register  to view this content.
    'Step 6 Save the newly created workbook
    Please Login or Register  to view this content.
    'Step 7 Turn application alerts back on
    Please Login or Register  to view this content.
    End Sub
    Last edited by mawnek; 10-26-2016 at 09:42 AM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,198

    Re: Runtime Error 13 .... Type Mismatch

    You're missing some ampersands here:
    Please Login or Register  to view this content.
    Also, please use code tags:
    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.

    Click on Edit to open your thread, then 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)

  3. #3
    Registered User
    Join Date
    06-30-2014
    Location
    DFW AREA
    MS-Off Ver
    2003 & 2007
    Posts
    3

    Re: Runtime Error 13 .... Type Mismatch

    The Run Time error 13....Type Mismatch occurs in Step 6 and the SaveName2 string fails to evaluate. All of the other SaveName strings evaluate as intended. Is it possible that I have something incorrect in the Filename format?

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,198

    Re: Runtime Error 13 .... Type Mismatch

    Yes, as I've said you're missing an ampersand

  5. #5
    Registered User
    Join Date
    06-30-2014
    Location
    DFW AREA
    MS-Off Ver
    2003 & 2007
    Posts
    3

    Re: Runtime Error 13 .... Type Mismatch

    I have altered Step 6 code as follows:
    [code]ActiveWorkbook.SaveAs _
    Filename:="\\NETWORK\shared\QUOTES\Bucket Elevator\" & SaveName1 \ "" & SaveName2 \ "" & SaveName3 & " " & SaveName4 & ".xls"[code]
    All of the SaveName components evaluate properly, but I still get a Runtime Error 13 .... Type Mismatch at the end, seemingly associated with the .xls" portion. Any suggestions?

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,198

    Re: Runtime Error 13 .... Type Mismatch

    Yes, as I've said, you're still missing an ampersand:
    Please Login or Register  to view this content.

+ 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. Type Mismatch Runtime Error 13
    By EXCELBENCH in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-21-2015, 05:06 PM
  2. Runtime error'13' - type mismatch
    By Polluz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2014, 01:12 PM
  3. RunTime Error 13: Type MIsmatch
    By tariq2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2013, 10:47 AM
  4. [SOLVED] Runtime Error '13' Type Mismatch
    By Rayneill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-08-2013, 01:03 AM
  5. [SOLVED] runtime error 13 type mismatch
    By chappie in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-30-2012, 10:12 PM
  6. RunTime Error 13 and Type Mismatch...
    By TheNewGuy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-24-2010, 09:24 AM
  7. runtime error 13 type mismatch
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2009, 11:15 PM

Tags for this Thread

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