+ Reply to Thread
Results 1 to 2 of 2

Code to run automatically

  1. #1
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Witbank, SA
    MS-Off Ver
    Excel 2013
    Posts
    268

    Code to run automatically

    hi there,

    I have a folder named "A". Inside this folder are 10 workbooks, named 1 through to 10. The workbooks contain the same amount of sheets and all tables are the same. Only the values differ. (naturally). There is another workbook which is named "master", also within this same folder "A". I am looking for a code that I can put in the "Master workbook, sheet 1", which will sum, lets say all the "A1" cells of all the "sheet 3" sheets of the 10 workbooks, BUT, the code should run automatically when workbook 11 is added to this "Folder A", and recalculate all the "A1" cells. Anytime a workbook is added, the code must automatically run and re-calculate. Is this at all possible?. I am using excel 2013.. any help will be greatly appreciated and I'm thanking you guys in advance already...

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Code to run automatically

    No, dont think so, you'll need permanent monitoring of it, so you'll need master sheet open all the time, polling the folder each minute or so, frequency up to you, but the completion of the task needs to be less than the frequency.

    You could run your code to get all the workbooks in the folder using application.ontime, then if anything new is detected it will be added, but not picked up the presence of the file to trigger it.

    You could write something in .NET to sit in your task tray that does it, i think Excel's out though.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Code is not working automatically
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2014, 12:49 AM
  2. Replies: 9
    Last Post: 08-30-2013, 07:49 AM
  3. Code creates new workbook-> code to automatically run a set code on that workbook
    By cwalker6 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2009, 08:00 PM
  4. Automatically starting code
    By Richard in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2006, 10:40 PM
  5. [SOLVED] Using automatically entered code
    By Tim in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-07-2005, 03:05 PM

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