Results 1 to 9 of 9

VBA to open, edit, save and close

Threaded View

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    YORK
    MS-Off Ver
    Excel 2003
    Posts
    22

    VBA to open, edit, save and close

    I Need a VBA to open, edit, save and close a number of excel files in a given folder.
    the cells i need to change are F5,I5 and P5. All cells are in the same place on each wookbook sheet, all the wookbooks are in the same folder. I have to update them from MIN to MIN1,MIN2 and MIN3 otherwise the consolidation does not work correctly. i would manually do these changes but its something that will be an on going problem.

    SO far i just have a macro to do this but with 500 files at once to change it takes some time. I would prefer it to be automated.
    PHP Code: 
    Sub Macro1()
    '
    Macro1 Macro
    '
    Keyboard ShortcutCtrl+w
    '
    Range("F5").Select
    ActiveCell.FormulaR1C1 = "MIN1"
    Range("I5").Select
    ActiveCell.FormulaR1C1 = "MIN2"
    Range("P5").Select
    ActiveCell.FormulaR1C1 = "MIN3"
    Range("G5").Select
    ActiveWorkbook.Save
    ActiveWindow.Close
    End Sub 
    Last edited by Cutter; 08-23-2012 at 11:31 AM. Reason: Corrected title

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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