Macro to save workbook with cell adress as file name to othe
Prep for a pre-employment Excel test with Job Test Prep
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Macro to save workbook with cell adress as file name to othe

  1. #1
    Guest

    Default

     
    I have a workbook that I want to save using information in a cell as the file name. I want this workbook to be saved to a location on our server rather than the default location in my hard drive. I've written some code as shown below. I've got the first part of the code worked out but I'm still having a problem with it saving to the server instead of my hard drive.


    Private Sub CommandButton3_Click()
    ThisFile = Range("G3") & Range("I3").Value
    ActiveWorkbook.SaveAs Filename:=ThisFile
    ActiveWorkbook.SaveAs Filename:= _ (maybe here to)
    "\Pchq7ntoffshoreMaintenanceSouth Tim FormsWork OrdersUncompleted Work Orders????????????????????? _
    , FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
    ReadOnlyRecommended:=False, CreateBackup:=False

    End Sub

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-02-19 06:07, Anonymous wrote:
    I have a workbook that I want to save using information in a cell as the file name. I want this workbook to be saved to a location on our server rather than the default location in my hard drive. I've written some code as shown below. I've got the first part of the code worked out but I'm still having a problem with it saving to the server instead of my hard drive.


    Private Sub CommandButton3_Click()
    ThisFile = Range("G3") & Range("I3").Value
    ActiveWorkbook.SaveAs Filename:=ThisFile
    ActiveWorkbook.SaveAs Filename:= _ (maybe here to)
    "Pchq7ntoffshoreMaintenanceSouth Tim FormsWork OrdersUncompleted Work Orders????????????????????? _
    , FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
    ReadOnlyRecommended:=False, CreateBackup:=False

    End Sub
    Try with

    ActiveWorkbook.SaveAs Filename:= _ (maybe here to)
    "Pchq7ntoffshoreMaintenanceSouth Tim FormsWork OrdersUncompleted Work Orders" & ThisFile _
    , FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
    ReadOnlyRecommended:=False, CreateBackup:=False
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Should appear like this

    "\Pchq7ntoffshoreMaintenanceSouth Tim FormsWork OrdersUncompleted Work Orders" & ThisFile

    Regards,

    Juan Pablo González
    http://www.juanpg.com

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
  •  

 

 
DMCA.com