+ Reply to Thread
Results 1 to 3 of 3

Save or SaveAs Macro

  1. #1
    Registered User
    Join Date
    03-06-2006
    Posts
    2

    Save or SaveAs Macro

    I have several files on Co Network and would like to build a Macro (behind a button) that would auto assign file name (using workbook cell reference - one identify name and second cell date) and when button is pressed it would perform save or saveas function re-directing that file to a specific network directory. I have tried several combinations with both save and saveas but in save it will not allow me to reference cell's from which i woulod like to enter name and with saveas function it allows me to assign name but it will not recognize network address where i would like to save the file. Also, with saveas function it closes original file and opens saved as file and I'm trying to have user stay in original file that was open. Any help will be greatly appreciated

    Thanks
    Arthur

  2. #2
    Dick Kusleika
    Guest

    Re: Save or SaveAs Macro

    Arthur

    You can use the SaveCopyAs method if you want to save a copy of the file and
    leave the original open and in its same location. If you can't get SaveAs
    to recognize the network address, you won't have better luck with
    SaveCopyAs. Likely, you have a typo in your path and it points to a
    directory that doesn't exist. You may also be missing a backslash somewhere
    in there. If you can't figure it out, post the code and the error message
    you're getting.

    --
    **** Kusleika
    MVP-Excel
    www.dailydoseofexcel.com

    knosalaa wrote:
    > I have several files on Co Network and would like to build a Macro
    > (behind a button) that would auto assign file name (using workbook
    > cell reference - one identify name and second cell date) and when
    > button is pressed it would perform save or saveas function
    > re-directing that file to a specific network directory. I have tried
    > several combinations with both save and saveas but in save it will
    > not allow me to reference cell's from which i woulod like to enter
    > name and with saveas function it allows me to assign name but it will
    > not recognize network address where i would like to save the file.
    > Also, with saveas function it closes original file and opens saved as
    > file and I'm trying to have user stay in original file that was open.
    > Any help will be greatly appreciated
    >
    > Thanks
    > Arthur




  3. #3
    Registered User
    Join Date
    03-06-2006
    Posts
    2
    I don't have working code as i have tried many options. If my memory serves me right

    sub filesave ()

    filename=range("8-dir'!d4")

    Workbook.SaveAs filename="W:\Corp...\subdir\filename & format(Now) mmmyyyy) & "(.xls)"

    end sub


    as you can see filename only have one cell reference and i need two where second has date format in different worksheet.

    thanks for your quick responce
    Arthur

+ 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