+ Reply to Thread
Results 1 to 3 of 3

codes, codes, codes...

  1. #1
    jatman
    Guest

    codes, codes, codes...

    i have the following code:

    Public Sub SaveAsA1()
    ThisFile = Range("A1").Value
    ActiveWorkbook.SaveAs Filename:=ThisFile
    End Sub

    i understand the above code, but what i need it to do is in this order is:

    save (like above into a target folder such as C:\Documents and Settings\All
    Users\Documents\Folder Name\Filename ...

    after the save, it prints out a copy of the file.

    thank you,

    jatman




  2. #2
    Don Guillett
    Guest

    Re: codes, codes, codes...

    Public Sub SaveAsA1()
    mypath = "c:\a\"
    ThisFile = Sheets("sheet1").Range("A1").Value
    'MsgBox mypath & thisfile & ".xls"
    ActiveWorkbook.SaveAs Filename:=mypath & ThisFile
    End Sub


    --
    Don Guillett
    SalesAid Software
    dguillett1@austin.rr.com
    "jatman" <jatman@discussions.microsoft.com> wrote in message
    news:1065BECA-A3AE-4FC7-9BD1-A0E6A8C289C8@microsoft.com...
    >i have the following code:
    >
    > Public Sub SaveAsA1()
    > ThisFile = Range("A1").Value
    > ActiveWorkbook.SaveAs Filename:=ThisFile
    > End Sub
    >
    > i understand the above code, but what i need it to do is in this order is:
    >
    > save (like above into a target folder such as C:\Documents and
    > Settings\All
    > Users\Documents\Folder Name\Filename ...
    >
    > after the save, it prints out a copy of the file.
    >
    > thank you,
    >
    > jatman
    >
    >
    >




  3. #3
    JMB
    Guest

    RE: codes, codes, codes...

    To print the entire workbook, try adding this to Don's suggestion.
    ActiveWorkbook.PrintOut Copies:=1


    "jatman" wrote:

    > i have the following code:
    >
    > Public Sub SaveAsA1()
    > ThisFile = Range("A1").Value
    > ActiveWorkbook.SaveAs Filename:=ThisFile
    > End Sub
    >
    > i understand the above code, but what i need it to do is in this order is:
    >
    > save (like above into a target folder such as C:\Documents and Settings\All
    > Users\Documents\Folder Name\Filename ...
    >
    > after the save, it prints out a copy of the file.
    >
    > thank you,
    >
    > jatman
    >
    >
    >


+ 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