calling data from a database using vba

GreenyMcDuff

Active Member
Joined
Sep 20, 2010
Messages
313
Morning all,

I am starting a new project involving vba and a postgreSQL database.

Quick question to get the ball rolling... is it possible to link the postgreSQL database via vba to excel 2007??

If so, how does this process work? The data needs to be manipulated, so in my head the process works according to the following steps:

1. data is stored in database
2. vba macro access's the database
3. data is imported to excel
4. vba macro used to manipulate data.

Does any of this sound do-able?

Kind Regards

Chris
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi Chris,

It is entirely possible. Here is some info from Microsoft:

http://office.microsoft.com/en-us/e...ry-to-retrieve-external-data-HA010099664.aspx

If an ODBC driver for your database has already been installed you should be able to connect to your database in a matter of minutes using the "Query Wizard". If the driver has not been installed then check the database vendors website or the CDs that came with your DB package for the driver and installation instructions.

Once you are able to connect via the Excel "Query Wizard" you can record a macro while accessing a database table with the Wizard. That will give you a good head start on the VBA code you will need.

Gary
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,691
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top