Hi,
I have successfully managed to connect to a database on a server, and NOT using the wizard I executed the below query in Microsoft Query then return the data to Excel.
select * from projects
where team = 'TEAM1'
and startdate >
to_date( '01-apr-2007 00:00:00', 'dd-mon-yyyy hh24:mi:ss' )
However, I'd like to be able to program this in VBA instead. But I have no idea how. Could anybody please give me some pointers? I just want it to be so when the macro is run, it connects to the DB and then runs that query, returning it to Excel.
Really would appreciate some help! Many thanks if you can!
I have successfully managed to connect to a database on a server, and NOT using the wizard I executed the below query in Microsoft Query then return the data to Excel.
select * from projects
where team = 'TEAM1'
and startdate >
to_date( '01-apr-2007 00:00:00', 'dd-mon-yyyy hh24:mi:ss' )
However, I'd like to be able to program this in VBA instead. But I have no idea how. Could anybody please give me some pointers? I just want it to be so when the macro is run, it connects to the DB and then runs that query, returning it to Excel.
Really would appreciate some help! Many thanks if you can!