Excel as Input Form for Another Database

A

aga2957

Hi!

I just want to know how I can use excel to input data for another
database. What I mean is, I will be designing an excel sheet as a form
and add a save button on that sheet. Once the user click on the save
button, it will save the data inputted on that excel sheet to another
database, let say for example access.

It is possible?

Aga
 
A

aga2957

Hi!

I used the "Use a closed workbook as a database (ADO)" for the project
that I'm doing but it returned an error.

I have inputted the code on one of my modules and a button will call
the procedure.

Once I click on the button it says 'User-define type not defined for
"cn As ADODB.Connection".

Can you tell how should I do this in VBA since I'm using excel? Thanks!
 
N

Norman Jones

Hi Aga,

Have you followed Ole's instructions:

'------------------------
The macro example assumes that your VBA project has added a reference
to the ADO object library.
You can do this from within the VBE by selecting the menu Tools,
References and selecting Microsoft ActiveX Data Objects x.x Object Library.
Use ADO if you can choose between ADO and DAO for data import or
export.
'------------------------
 
A

aga2957

Hi!

Thank you for your reply. Yes, I redid all the instructions and I go
it working finally. However, another problem is, whenever I close th
excel file and open it again, the procedure does not work. Is ther
something wrong?

Ag
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top