+ Reply to Thread
Results 1 to 3 of 3

Saving Worksheets

  1. #1
    D.Parker
    Guest

    Saving Worksheets

    I am trying to save a "worksheet" from the active workbook_A into a new
    workbook_B, but I am wanting the user to input a filename to give workbook_B.
    I'm assuming I have to create a UserForm to grab the input name from the
    user.

    Worksheets("from workbook_A").Select
    Worksheets("LogHistory").SaveAs = "c:\temp\<filename from UserForm>"

    No success. Can anyone prescribe a remedy that is simple? Thank you.

    D. Parker

  2. #2
    JCanyoneer
    Guest

    RE: Saving Worksheets

    Did you look at the GetSaveAsFilename method in the Help file?

    "D.Parker" wrote:

    > I am trying to save a "worksheet" from the active workbook_A into a new
    > workbook_B, but I am wanting the user to input a filename to give workbook_B.
    > I'm assuming I have to create a UserForm to grab the input name from the
    > user.
    >
    > Worksheets("from workbook_A").Select
    > Worksheets("LogHistory").SaveAs = "c:\temp\<filename from UserForm>"
    >
    > No success. Can anyone prescribe a remedy that is simple? Thank you.
    >
    > D. Parker


  3. #3
    D.Parker
    Guest

    RE: Saving Worksheets

    I am using the GetSaveAsFilename procedure as you suggested and from another
    response from the user, but when I go to my folder there is no saved file.
    Also, I am only interested in saving the worksheet to a new workbook with the
    intention that no VBA programming code will exist in the save file.

    This is what I have thus far:

    Dim SaveName As Variant
    Dim fFilter As String
    Dim NewName As Variant

    NewName = "P2 LogHistory Shift"
    fFilter = "Excel Files (*.xls), *.xls"
    SaveName = Application.GetSaveAsFilename _
    (NewName, fileFilter:=fFilter)

    Any adjustments to save a specific worksheet to a new workbook with no VBA
    code saved is appreciated?



    "D.Parker" wrote:

    > I am trying to save a "worksheet" from the active workbook_A into a new
    > workbook_B, but I am wanting the user to input a filename to give workbook_B.
    > I'm assuming I have to create a UserForm to grab the input name from the
    > user.
    >
    > Worksheets("from workbook_A").Select
    > Worksheets("LogHistory").SaveAs = "c:\temp\<filename from UserForm>"
    >
    > No success. Can anyone prescribe a remedy that is simple? Thank you.
    >
    > D. Parker


+ Reply to Thread

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