+ Reply to Thread
Results 1 to 3 of 3

Need To save a spreadsheet multiple times through a macro

  1. #1
    Registered User
    Join Date
    03-16-2006
    Posts
    3

    Need To save a spreadsheet multiple times through a macro

    I have a macros that let me update information for multiple companies. I want to add to it to save the spredsheet each time a new company is updated with information. The following macro updates the information and then prints. I want it to then save the spreadsheet after each print. How can I do this. See the following macro:

    Sub Agency()
    '
    ' Agency Macro
    ' Macro recorded 3/14/2006 by Interpublic User
    '

    '
    For i = 5 To 134
    Range("E8").Select
    Sheets("Agency List").Select
    Application.Run "OnSheetChange"
    Range("A" & i).Select
    Selection.Copy
    Sheets("Balance Sheet").Select
    Application.Run "OnSheetChange"
    Range("E8").Select
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Selection.AutoFilter Field:=1, Criteria1:="2"
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    Next i
    End Sub

  2. #2
    Barb Reinhardt
    Guest

    Re: Need To save a spreadsheet multiple times through a macro

    Try activeworkbook.save

    "mibsaweiss" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I have a macros that let me update information for multiple companies. I
    > want to add to it to save the spredsheet each time a new company is
    > updated with information. The following macro updates the information
    > and then prints. I want it to then save the spreadsheet after each
    > print. How can I do this. _See_the_following_macro:_
    >
    > Sub Agency()
    > '
    > ' Agency Macro
    > ' Macro recorded 3/14/2006 by Interpublic User
    > '
    >
    > '
    > For i = 5 To 134
    > Range("E8").Select
    > Sheets("Agency List").Select
    > Application.Run "OnSheetChange"
    > Range("A" & i).Select
    > Selection.Copy
    > Sheets("Balance Sheet").Select
    > Application.Run "OnSheetChange"
    > Range("E8").Select
    > ActiveSheet.Paste
    > Application.CutCopyMode = False
    > Selection.AutoFilter Field:=1, Criteria1:="2"
    > ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    > Next i
    > End Sub
    >
    >
    > --
    > mibsaweiss
    > ------------------------------------------------------------------------
    > mibsaweiss's Profile:
    > http://www.excelforum.com/member.php...o&userid=32533
    > View this thread: http://www.excelforum.com/showthread...hreadid=533944
    >




  3. #3
    Registered User
    Join Date
    03-16-2006
    Posts
    3

    need more info

    Activeworkbook.save would save the file over the same file. I want to save each file with a different file name. I want to choose a specific cell that each time the file refreshes with new information that cell would be the new filename.

    Thanks.

+ 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