Closed Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    04-01-2009
    Location
    vancouver,Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    How can I save a single sheet of a workbook using a macro

    Wow I am familiar with saving a workbook to almost any format but when it come to saving a single sheet I'm a noob!!!

    Someone please save me hours futile future searching, after hours of already searching by answering how to do something so simple in a macro!

    All i want to do is save one sheet (of a workbook that has many sheets) to a specific location in my hard drive.

    I was using the
    Code:
        Sheets("sheet").Copy
    
        ActiveWorkbook.SaveAs Filename:= _
            "C:\sheet.xls", FileFormat:= _
            xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
            , CreateBackup:=False
            ActiveWorkbook.Close
    untill i found out it was cutting off characters over a certain length in the cells.

    does not :
    Code:
         Worksheets("sheetname").SaveAs Filename:="c:csvip.xls", _
           FileFormat:=xlExcel4
    or

    Code:
        Activeworksheet.SaveAs Filename:= _
            "C:sheet.xls", _
            FileFormat:=xlNormal, CreateBackup:=False
    I can't seem to get anything to work!
    Last edited by prouddad; 04-01-2009 at 10:04 PM. Reason: changed title

  2. #2
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Save A Single sheet - A real challenge!

    Welcome to the forum, prouddad.

    Please read the forum rules about thread titles, and then amend yours accordingly.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,213

    Re: Save A Single sheet - A real challenge!

    Also, when reviewing the rules, please pay attention to the one about cross-posting.

    http://www.mrexcel.com/forum/showthread.php?t=381704

  4. #4
    Registered User
    Join Date
    04-01-2009
    Location
    vancouver,Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: How can I save a single sheet of a workbook using a macro

    sorry didn't realize both boards were the same. Delete this post if you like.

  5. #5
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,447

    Re: How can I save a single sheet of a workbook using a macro

    You haven't bothered reading the rules because you would see that cross posting means posting the same question on different forums with a link. You will find this applies to Mr Excel as well!
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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.2.0