+ Reply to Thread
Results 1 to 6 of 6

Run time error - Type mismatch

  1. #1
    Registered User
    Join Date
    01-30-2014
    Location
    Bratislava, SK
    MS-Off Ver
    Excel 2013
    Posts
    5

    Run time error - Type mismatch

    HI buddies
    there is an error in the last sequence of this code (bold), and I can not find the reason why
    please help
    Please Login or Register  to view this content.

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

    Re: Run time error - Type mismatch

    wsCopyFrom and ws are range variables. A string is expected.

    Try
    Please Login or Register  to view this content.
    _
    ...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-30-2014
    Location
    Bratislava, SK
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Run time error - Type mismatch

    Yes that worked. Thank you very much! Last problem to be solved - how to copy the buttons which are in the original sheet? I tried several ways, but can´t get it done.
    These are the forms-buttons. I read it is easier to copy them rather than the ActiveX objects. Is that correct? How can I do that? thank you again!

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

    Re: Run time error - Type mismatch

    If you use
    Please Login or Register  to view this content.
    it will copy Forms buttons along with the rest of the sheet.
    If you immediately clear all the cells of the new (copied) sheet, it will leave only the buttons.

    If you copy a sheet from one workbook to a different workbook, the buttons on the new sheet will be assigned to macros residing in the first sheet. If the different workbook is to be a stand-alone workbook, the buttons will all have to be assigned to macros in the new workbook.

  5. #5
    Registered User
    Join Date
    01-30-2014
    Location
    Bratislava, SK
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Run time error - Type mismatch

    Dear Mike
    thank you but as you can see my code is a bit more complex....
    Quote Originally Posted by mikerickson View Post
    If you use
    Please Login or Register  to view this content.
    it will copy Forms buttons along with the rest of the sheet.
    If you immediately clear all the cells of the new (copied) sheet, it will leave only the buttons.

    If you copy a sheet from one workbook to a different workbook, the buttons on the new sheet will be assigned to macros residing in the first sheet. If the different workbook is to be a stand-alone workbook, the buttons will all have to be assigned to macros in the new workbook.

  6. #6
    Registered User
    Join Date
    01-30-2014
    Location
    Bratislava, SK
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Run time error - Type mismatch

    I ve tried to it like this, but there s an error, hopefuly you can see it..
    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. Run-Time error 13 type mismatch - HELP
    By clundeen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-17-2013, 04:23 PM
  2. [SOLVED] Run-time error '13': Type mismatch
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2013, 08:56 AM
  3. [SOLVED] Run-time error '13': Type mismatch
    By smonzon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-19-2013, 12:42 AM
  4. [SOLVED] run-time error 13 type mismatch
    By ildestino in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2012, 03:40 AM
  5. Run time error '13' - type mismatch
    By a8747 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 05-19-2012, 09:41 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