View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill Manville Bill Manville is offline
external usenet poster
 
Posts: 473
Default Open Access DB in Excel with Command Button

Darrell wrote:
I want to add a command button in my spreadsheet to open my access data.
I know I have to create a macro but I do not know the syntax.
Is it simple enough where someone can post it and I will copy and paste?


You just want to open a database within Access?

Shell Application.Path & "\MSACCESS.EXE C:\MyDir\MyDatabase.mdb"

If you want to access the data from the spreadsheet then you would be better to execute a query.
Data / Get External Data / New Database Query
Record a macro as you do it and you will be most of the way there.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup