VBA code to copy sheets of just values and combo boxes in new workbook

  • Hi!


    I have written some code (adapted from another post) which will create a new workbook and then copy several sheets of just the values in the old workbook into it. The code also keeps the formatting (which is GREAT!) but it seems to fail to copy/paste the combo and check boxes that I have on the old workbook. any idea how to include them? ALSO the code for the string "NewName" returns the error : "Method 'Range' of object '_worksheet' failed. What am I doing wrong? Custname, Ploc, and wtgtype are named ranges in the worksheet 'Project Info' in the old workbook.


    Thanks!
    Tim


  • Re: VBA code to copy sheets of just values and combo boxes in new workbook


    Quote

    ..but it seems to fail to copy/paste the combo and check boxes that I have on the old workbook. any idea how to include them?

    Copy the sheet and not the cells on the sheet, E.g


    Code
    'Will copy sheet to NEW workbook
    Sheet1.Copy
  • Re: VBA code to copy sheets of just values and combo boxes in new workbook


    David,


    Thank you so much for your quick response. I'm afraid I'm such a novice with VBA, I am struggling to apply your wisdom. Would you mind merging your solution in my code so I can see where it fits? I want to make sure to preserve the formatting etc. in the new workbook, but make sure just to past the values rather than the formulas.


    Thanks!!
    Tim

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!