Results 1 to 3 of 3

Export Sheet into xls format without SaveAs

Threaded View

  1. #1
    mushman1
    Guest

    Export Sheet into xls format without SaveAs

    Hello- This seems pretty basic, but I can't figure it out.

    Goal:
    - Export a single sheet from within XL2003 to a new xls file. Note: SaveAs command just saves the existing workbook that the button is within. Here's the existing code I'm using:
    Private Sub CommandButton1_Click()
      Dim FN As String
      FN = Range("A1")
      Sheet1.SaveAs "F:\export\" & FN
    End Sub
    As you can see, it just takes the content of A1 as the filename to be saved as. The problem is this doesn't actually export, it just saves the file which isn't really what I'm looking for. I'm looking to have the contents of Sheet1 exported.

    Hope I explained it properly. Any thoughts?

    Thx!
    - Mr. Bill
    Last edited by mushman1; 11-23-2009 at 10:15 PM. Reason: forgot code formatting tag :)

Thread Information

Users Browsing this Thread

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

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