+ Reply to Thread
Results 1 to 17 of 17

Is It Possible to Update Cells of Multiple Files?

  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!
    Please Login or Register  to view this content.
    Last edited by elgourmet; 08-02-2010 at 09:50 AM.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Is It Possible to Update Cells of Multiple Files?

    You could use this code:

    Please Login or Register  to view this content.
    Regards,
    Antonio
    Last edited by antoka05; 07-27-2010 at 03:01 AM.

  3. #3
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    thank you very very much, antonio!
    unfortunately, i'm always getting the error "Path not found", even I am sure that the path is 100% correct.
    any ideas?

  4. #4
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    i've managed to fix the path problem
    one more question though: is there a way to define the path to an exact file in excel which shall then be upated?

  5. #5
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    anyone?

  6. #6
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: Is It Possible to Update Cells of Multiple Files?

    Your question isn't clear.

  7. #7
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    oh ok, sorry!

    i'll try to explain it a little bit more detailed:

    Please Login or Register  to view this content.
    i'd like the path to be replaced by a variable.
    like having the path in cell A1

    Please Login or Register  to view this content.
    i'm sure this is rather simple, yet these simple things are sometimes upon me

  8. #8
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: Is It Possible to Update Cells of Multiple Files?

    This should do it
    Please Login or Register  to view this content.
    hth
    Ajay

  9. #9
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    thank you so much! you just made my day :D
    one last question though: how can I update a cell instead of the header?

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: Is It Possible to Update Cells of Multiple Files?

    I am not sure what you mean by "instead of the header", but following will update/set a cell value:-

    Please Login or Register  to view this content.
    hth
    Ajay

  11. #11
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    mhmm, thanks. i thought so, but somehow it doesnt work:
    ws.Range("A2") = ActiveWorkbook.Sheets("Tabelle1").Range("=A20")

    i dont get an error, but it just doesnt work

  12. #12
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: Is It Possible to Update Cells of Multiple Files?

    replace Range("=A20") with Range("A20")

  13. #13
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    this didnt work either

    i'll post the whole macro once again, maybe you can spot the error? :-/

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: Is It Possible to Update Cells of Multiple Files?

    Sorry, I am not sure why this does not work.

  15. #15
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    ok. still, thanks a lot for your input!!

  16. #16
    Registered User
    Join Date
    07-19-2010
    Location
    Austria
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Is It Possible to Update Cells of Multiple Files?

    i've managed to fix the problem! my bad
    you can mark this thread as SOLVED. thanks again for all the help, you are great!

  17. #17
    Forum Contributor
    Join Date
    03-11-2010
    Location
    India
    MS-Off Ver
    2010
    Posts
    268

    Re: Is It Possible to Update Cells of Multiple Files?

    You need to mark this thread as SOLVED by editing first post in advanced mode.

+ 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