+ Reply to Thread
Results 1 to 2 of 2

macro to create file for every new record added to the list

  1. #1
    Registered User
    Join Date
    04-01-2010
    Location
    Worcester, UK
    MS-Off Ver
    Microsoft 365 (subscription)
    Posts
    50

    macro to create file for every new record added to the list

    Hi all excel experts,

    I am in process of preparing file which will be kind of accident register.
    I've attached workbook on which I am working for better explaining what I am trying to get.
    Basically my workbook has 4 worksheets but one related to my problem is called 'Accidents Log'.
    That worksheet contains a table with records of accidents which has occurred in my workplace with additional information about every accident.
    And what I am trying to get is macro (because VBA is I think the only way to sort my problem out, correct me if I am wrong...) which:
    - every time new accident info is added (new line in ‘Accidents Log’ is filled in with information) creates new file which will contain one worksheet - this will be copy of ‘Form’ last sheet from my workbook but filled in with information from ‘Accidents Log’ so Date and time of accident, name, department and shift of person, causation, body area, type of injury and manager responsible for investigation; file needs to be named as no.(first column of accidents table) & name of employee (6th column of accidents table) and saved to this directory: c:\users\jaro\(name of the department from 11th column of accidents table) <-- this subfolders don’t exist at the beginning of the project; if has been created for any of the records already inputted any further accident which will occur in the same department will not require folder creation (so macro needs to check if folder does not already exist before creates one)
    - link to every file created for any accident needs to be created, next to the ‘Accidents Log’ table so when you press it opens file and you can add extra info to it (like investigation findings etc...) and save it
    - rename of the created file should be restricted so nobody can manually change the name of the file going to the folder where file normally remain
    - when record of any accident is deleted (cleared) question if file needs to be deleted is asked and this might happen (deletion)

    Hope what I am trying to get is ‘do able’ and my explanation is clear.
    Please help as I am really desperate to finish my file.
    Any suggestions and help with any of the parts welcome.

    Thanks in advance
    Attached Files Attached Files
    Last edited by jarssonn; 10-15-2010 at 09:44 AM.

  2. #2
    Registered User
    Join Date
    04-01-2010
    Location
    Worcester, UK
    MS-Off Ver
    Microsoft 365 (subscription)
    Posts
    50

    Re: macro to create file for every new record added to the list

    Anyone got idea how to start with this please? I am really desperate to finish my file but this will not be possible without your help...

+ 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