Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Save Single Worsheet Macro (Excel 2002)

    Hi

    I have a workbook with a specific worksheet called "Customer Specific Products" which will be issued to lots of different people I would like a macro to copy only this worksheet to a new workbook,
    But allow each individual user to select a Local drive and folder where it is to be saved to, plus name the file.

    Is this possible please.

    Many thanks
    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Save Single Worsheet Macro (Excel 2002)

    Here is a macro:

    Sub SaveSheet()
    Dim varFile As Variant
    varFile = Application.GetSaveAsFilename("Export.xls", "Excel Workbooks (*.xls),*.xls")
    If varFile = False Then Exit Sub
    Worksheets("Customer Specific Products").Copy
    With ActiveWorkbook
    .SaveAs varFile
    .Close
    End With
    End Sub

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Save Single Worsheet Macro (Excel 2002)

    Hi Hans

    Once again I am so grateful,

    FYI the code went into debug at this point (Worksheets("Customer Specific Products").Copy) however I shortened the name to CSP and it worked just fine.

    NB I checked the worksheet name several times, including copying and pasting but It would not work until I shortened the name.

    Many Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •