+ Reply to Thread
Results 1 to 10 of 10

Exporting data from an excel worksheet to a masterfile.

  1. #1
    Registered User
    Join Date
    11-30-2007
    Posts
    15

    Question Exporting data from an excel worksheet to a masterfile.

    Hi Everyone,

    What I am attempting to do is to create a user form in Excel that people will fill out. When it comes to submitting it what I want to happen is the data will be exported from the form and saved into a masterfile workbook. Each form will have one row on the masterfile, each field will be one cell in that row.

    Any help in this would be greatly appreciated.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is the UserForm in the master file?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    11-30-2007
    Posts
    15
    No, the user form needs to be a seperate workbook.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why don't you have the form in the master workbook? It would be muchh simpler.

    You will need to open the masterfile, presumably on a server then write to the sheet. Use the Macro Recorder to record opening this file to get the correct path.

  5. #5
    Registered User
    Join Date
    11-30-2007
    Posts
    15
    Thinking about it, I suppose it could be a possibility, however the way I normally make forms is to save it as a template so each new user opens a blank copy. The form is going to be used by multiple users simultaneously. How do I ensure that when a user saves the form and it exports the data to a seperate sheet that it goes to the next available new row?

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Are you talking about a UserForm or a sheet designed as a form?

    To get the next row you need to use something like


    Please Login or Register  to view this content.
    Or

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-30-2007
    Posts
    15
    Thanks for the info regarding next available cell, the way i design forms is to designa a worksheet as a form with macros to handle validation and saving.

    I guess the reason I'm posting here is to look for better ways than what I already use.

    I'm still now sure how to overcome the problem of multiple users using the form at the sametime, if 2 people open the form at the same time and save it, they're both going to attempt to write the same row, how can this be overcome?

    The workbook is going to have to be opened as a shared workbook to allow people to use it simultaneously, in my experience once the workbook is open it is static, it isnt updated with changes from other users, is it possible to refresh the workbook with changes from other people just Before saving?
    Last edited by Xeno; 07-02-2008 at 06:38 AM.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You will get errors iof you are trying to allow multiple users to write to the sheet, maybe you should consider Access for this.

  9. #9
    Registered User
    Join Date
    11-30-2007
    Posts
    15
    Unfortunately I don't have access to access. my company doesn't support it. Excel is the best that I have.

  10. #10
    Registered User
    Join Date
    11-30-2007
    Posts
    15
    I guess the best that I can do then is to write the macro so that it opens an external shared workbook and writes the data to it and closes it again as quickly as possible to avoid conflicts. I will also have to come up with some error handling code to handle the inevitable conflicts that happen.

+ 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