Results 1 to 17 of 17

Is It Possible to Update Cells of Multiple Files?

Threaded View

elgourmet Is It Possible to Update... 07-27-2010, 02:07 AM
antoka05 Re: Is It Possible to Update... 07-27-2010, 02:56 AM
elgourmet Re: Is It Possible to Update... 07-27-2010, 08:06 AM
elgourmet Re: Is It Possible to Update... 07-29-2010, 01:50 AM
elgourmet Re: Is It Possible to Update... 08-02-2010, 01:47 AM
ajaykgarg Re: Is It Possible to Update... 08-02-2010, 02:06 AM
elgourmet Re: Is It Possible to Update... 08-02-2010, 02:17 AM
ajaykgarg Re: Is It Possible to Update... 08-02-2010, 02:22 AM
elgourmet Re: Is It Possible to Update... 08-02-2010, 02:43 AM
ajaykgarg Re: Is It Possible to Update... 08-02-2010, 02:47 AM
elgourmet Re: Is It Possible to Update... 08-02-2010, 02:54 AM
ajaykgarg Re: Is It Possible to Update... 08-02-2010, 03:08 AM
elgourmet Re: Is It Possible to Update... 08-02-2010, 03:38 AM
ajaykgarg Re: Is It Possible to Update... 08-02-2010, 04:18 AM
elgourmet Re: Is It Possible to Update... 08-02-2010, 05:14 AM
elgourmet Re: Is It Possible to Update... 08-02-2010, 09:14 AM
ajaykgarg Re: Is It Possible to Update... 08-02-2010, 09:23 AM
  1. #1
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Talking Is It Possible to Update Cells of Multiple Files?

    hello again

    the last time i was posting here, i had a question about updating headers in multiple worksheets. Teylyn offered me some great advice - at this point I'd like to say thanks again. I built up a lot on this code, and it really helps me every day.

    I'm still working on multiple updates of various tables, sheets, cells, headers....
    however, today i've come across a challenge which I am not able to pass alone

    I'm trying to achieve the following:
    I have 5 excel FILES in a folder.
    what i would like to do now is to update a certain cell (or the header, doesnt matter..) in all 5 files. is this even possible with VBA?

    starting with the code from the last post, i think the line with the activeworkbook-code is where the change has to be. the problem is that i don't know where to start

    any help or advice would be very much appreciated!
    Sub CellInHeader()
    Dim ws As Worksheet
    Dim hdr As String
    Dim arrSheets
    'set the array of sheets to be worked on
    'list the sheet names here
    arrSheets = Array("Sheet1", "Sheet2", "Sheet3")
    
    'turn off screen updating to speed up the macro
    Application.ScreenUpdating = False
    
    For i = LBound(arrSheets) To UBound(arrSheets)
        Set ws = Sheets(arrSheets(i))
        hdr = ws.PageSetup.CenterHeader
        hdr = Left(hdr, InStr(hdr, Chr(10)))
        ws.PageSetup.CenterHeader = hdr & "Annual Report " & CHANGES HERE?! ActiveWorkbook.Sheets("Sheet4").Range("=A20").Text
    Next i
    Application.ScreenUpdating = True
    End Sub
    Last edited by elgourmet; 08-02-2010 at 09:50 AM.

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