Vba Button Export Data From Xls To Mdb

  • I am working on a project that will be a test for users. The forum they will get will have 4 worksheets two of which will be hidden. The first one will be a general title page asking for their name. The second one will give them a series of question and they will select the answers from a drop down menu. Now their answers will be parsed with the answers using an if statement on the last sheet. From there the last sheet will have their name which is pulled from the first forum and their results for the questions if an X is put then they got it right if its blank they got it wrong.

    The main thing I am wanting to do is when the user finishes inputing their answers there will be a button that says submit which will use a VBA script to send the data from sheet 4 with their name and the X or no X data to a access database on the network. From there a master sheet will read the data so results can be viewed.

    My access is a little rusty along with my VBA I do apologize and I am looking for a solution to this on my own but I would like to seek advise from others that may have more knowledge or more brushed up on these areas.

    Thank you to anyone in advanced.

  • Re: Vba Button Export Data From Xls To Mdb

    You should use ADO for this.
    The example below shows how to add data to a database using ADO.

    Don't forget to set your reference, otherwise the code won't work.

    Hope this gives you an idea.

  • Re: Vba Button Export Data From Xls To Mdb

    Thanks that is a different approach to what I came up with but I might test it out to see if it works better than the current one I have ...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!