How do I run an external command from within VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

How do I run an external command from within VBA?
I want to execute a sql command from within Excel and take the SQL output an
import it into an Excel sheet for further processiing?

Thanks!
 
This is a long topic. I suggest that you look at ADO connections.
Look for the following

ADO command execution
ADO recordset objects
Excel CopyFromRecordset method

Good Luck.
 

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

Back
Top