Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: how can i save a sheet in my workbook as a separate file usi

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    how can i save a sheet in my workbook as a separate file using macro???

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try this:

    Sub Save_Sheet()
    Sheets("Sheet1").Copy
    ActiveWorkbook.SaveAs FileName:="C:My DocumentsSheet1.xls"
    End Sub

    It's never too late to learn something new.

    Ricky

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    73
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    how about saving a range of cells to a new work sheet???

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Location
    Ahmedabad Gujarat
    Posts
    303
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sub saveonesheet()

    Dim sht As Worksheet
    Dim strshtname As String
    Application.DisplayAlerts = False
    strshtname = InputBox("Give the Name of the Sheet You Want to Protect as Workbook.")
    For Each sht In Worksheets
    If sht.Name <> strshtname Then
    sht.Delete
    End If
    Next sht
    Application.GetSaveAsFilename strshtname
    ' You can save your file in number of formats.
    'ThisWorkbook.SaveAs "d:myback" & Worksheets("sheet4").Range("a1").Text, xlNormal

    Application.DisplayAlerts = True
    End Sub


    ni****h desai
    http://www.pexcel.com

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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