+ Reply to Thread
Results 1 to 10 of 10

Help saving user inputted data from a worksheet to another worksheet and saving it.

  1. #1
    Registered User
    Join Date
    01-05-2009
    Location
    Dorset, UK
    MS-Off Ver
    Excel 2003
    Posts
    9

    Help saving user inputted data from a worksheet to another worksheet and saving it.

    Good morning,

    I am new to the forum and after havign a look around for what I need, I can't find the answer.

    I have created a form in a worksheet which I have added questions too and then locked all cells except the ones where I want the answers in.

    I have then added a button to the bottom of the sheet called "Print and Save". This work sheet is called "form"

    On a second sheet called "database", I have all the titles of the questions running from a -> k and nother else.

    What I want to happen is the user input the information on "form" into the boxes available. Once they have completed the questions, I want them to be able to click on "Print and Save" so that firstly the page "form" prints, and then for all of the answers to be saved in "database" below the titles for each question.

    I have had a play, but just don't know where to start. Also, once there is a row of questions below the titles, I don't want it to overwrite information already there, it needs to go onto the next empty row available.

    Could anyone help me?

    Attached is my excel file.

    You will see in the code that I have the code for printing.. I just found this on the net and it seems to work fine for me.

    Thanks alot!

    Pete
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    The contacts Form example has basic code that should get you startede with this. Free download here

    http://www.excel-it.com/vba_examples.htm
    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
    01-05-2009
    Location
    Dorset, UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    That's fantastic!

    If only I had found this earlier!

    Problem now solved, however it has led me onto another idea.

    Now in database, I would like the first column to be a referance (Basically a counter). So everytime save is clicked, it counts and saves the input as 1, 2, 3 etc.

    How do I go about this?

    Cheers

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    Try this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-05-2009
    Location
    Dorset, UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Hmm i'm struggerling.. Not working yet.

    Please Login or Register  to view this content.
    I have turned the print section off for the min.. It's just not adding the referance..

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    I've amended your code and added a Named Range for the input cells - input

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-05-2009
    Location
    Dorset, UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Thanks.

    Was not quite working, but fixed it myself and works perfectly now!

    Thanks very much for your help.. I'll rate you shortly.

    With regards named range clear, I did have this previously, however where I lock the worksheet, the cells which are not accessable within the range being blank and not used (i'm using them as spaces between accessable boxes), the code errors as it's unable to access them. I therefore reverted to clearing each cell seperately.

    What's the advantage of doing them as a named range? Just less typing and slightly quicker?

    In my persuit for perfection now, I want the the database to be formatted based on the quantity. Everytime data is added, I want the "table" to have the border continue with the data.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    I created the range only containing the individual cells, did you?

    You can copy the formats from above, but if you have Excel 2003 you can look at the Lists feature

    http://www.excel-it.com/excel2003_lists.htm

  9. #9
    Registered User
    Join Date
    01-05-2009
    Location
    Dorset, UK
    MS-Off Ver
    Excel 2003
    Posts
    9
    Your range consisted of :-

    Please Login or Register  to view this content.
    Not individual cells..

    I have Excel 2007. I just want the column "titles" with a full cell borders and then everytime a row is added, that row to have full cell borders also..

    I can't see how a list will help here?

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202
    I changed the range in your example.
    Attached Files Attached Files

+ 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