Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Opening an Access mdb file from Excel VBA

If anyone out there can assist me I will be most grateful. I am trying to
open an Access mdb file from VBA within excel and to further open one of the
macros within the mdb file.

If it helps, the purpose of this is to udpate an Access database from some
extremely large spreadsheets from excel so that I can run some killer
financial reports from it. I find that sum-if and vlookups on such large
amounts of data are cumbersome in excel alone. So, I want to do the calcs in
Access through queries and return them into excel. But, as this spreadsheet
is going to be used by others, I want it to be seemless.

I can accomplish the task if I put the following string into Start/Run:

"C:\Program Files\Microsoft Office\Office11\msaccess.exe" "C:\Documents and
Settings\Administrator\My Documents\Test Directory\Excel Access Test Db.mdb"
/Excl /X Macro1"

Please help.


Regards,

Layne

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Opening an Access mdb file from Excel VBA

Layne

What does the macro in Access do? There's generally not a lot facility for
running macros in other Office apps because it's better to run all the code
from the source app. Is the Access macro something that you could convert
into an Excel macro and run it from there?


--
Dick Kusleika
MS MVP - Excel
www.dailydoseofexcel.com

Layne wrote:
If anyone out there can assist me I will be most grateful. I am
trying to open an Access mdb file from VBA within excel and to
further open one of the macros within the mdb file.

If it helps, the purpose of this is to udpate an Access database from
some extremely large spreadsheets from excel so that I can run some
killer financial reports from it. I find that sum-if and vlookups on
such large amounts of data are cumbersome in excel alone. So, I want
to do the calcs in Access through queries and return them into excel.
But, as this spreadsheet is going to be used by others, I want it to
be seemless.

I can accomplish the task if I put the following string into
Start/Run:

"C:\Program Files\Microsoft Office\Office11\msaccess.exe"
"C:\Documents and Settings\Administrator\My Documents\Test
Directory\Excel Access Test Db.mdb" /Excl /X Macro1"

Please help.


Regards,

Layne



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Opening an Access mdb file from Excel VBA

Thanks for the resonse Dick. The macro just does the following:
1. Deletes the only table in the db.
2. Imports the same table again.

Effectively, I just want to use Access to manage the large sheet from excel
with queries in order to avoid the time consuming calculation time of Excel.

Have any ideas?


Layne

"Dick Kusleika" wrote:

Layne

What does the macro in Access do? There's generally not a lot facility for
running macros in other Office apps because it's better to run all the code
from the source app. Is the Access macro something that you could convert
into an Excel macro and run it from there?


--
Dick Kusleika
MS MVP - Excel
www.dailydoseofexcel.com

Layne wrote:
If anyone out there can assist me I will be most grateful. I am
trying to open an Access mdb file from VBA within excel and to
further open one of the macros within the mdb file.

If it helps, the purpose of this is to udpate an Access database from
some extremely large spreadsheets from excel so that I can run some
killer financial reports from it. I find that sum-if and vlookups on
such large amounts of data are cumbersome in excel alone. So, I want
to do the calcs in Access through queries and return them into excel.
But, as this spreadsheet is going to be used by others, I want it to
be seemless.

I can accomplish the task if I put the following string into
Start/Run:

"C:\Program Files\Microsoft Office\Office11\msaccess.exe"
"C:\Documents and Settings\Administrator\My Documents\Test
Directory\Excel Access Test Db.mdb" /Excl /X Macro1"

Please help.


Regards,

Layne




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Opening an Access mdb file from Excel VBA

Layne

I'm pretty sure you can do that stuff straight from Excel with a reference
set to the Access Object Library. Since you have a command line that works,
you might want to try something first. In VBA there is a Shell statement
that basically mimics the command line. You would use it like

Shell "C:\Program Files\Microsoft Office\Office11\msaccess.exe 'C:\Documents
and Settings\Administrator\My Documents\Test Directory\Excel Access Test
Db.mdb" /Excl /X Macro1'"

However, you have to get the syntax just right particularly with regard to
the double quotes. I'd give you some advice on that but I can never
remember how to do it just right and have to relearn it every time. I'd
guess it should look like the one above, but I can't be sure.

Let me know if that doesn't work and you need help with an Excel macro that
does the same as the Access macro.

--
Dick Kusleika
MS MVP - Excel
www.dailydoseofexcel.com

Layne wrote:
Thanks for the resonse Dick. The macro just does the following:
1. Deletes the only table in the db.
2. Imports the same table again.

Effectively, I just want to use Access to manage the large sheet from
excel with queries in order to avoid the time consuming calculation
time of Excel.

Have any ideas?


Layne

"Dick Kusleika" wrote:

Layne

What does the macro in Access do? There's generally not a lot
facility for running macros in other Office apps because it's better
to run all the code from the source app. Is the Access macro
something that you could convert into an Excel macro and run it from
there?


--
Dick Kusleika
MS MVP - Excel
www.dailydoseofexcel.com

Layne wrote:
If anyone out there can assist me I will be most grateful. I am
trying to open an Access mdb file from VBA within excel and to
further open one of the macros within the mdb file.

If it helps, the purpose of this is to udpate an Access database
from some extremely large spreadsheets from excel so that I can run
some killer financial reports from it. I find that sum-if and
vlookups on such large amounts of data are cumbersome in excel
alone. So, I want to do the calcs in Access through queries and
return them into excel. But, as this spreadsheet is going to be
used by others, I want it to be seemless.

I can accomplish the task if I put the following string into
Start/Run:

"C:\Program Files\Microsoft Office\Office11\msaccess.exe"
"C:\Documents and Settings\Administrator\My Documents\Test
Directory\Excel Access Test Db.mdb" /Excl /X Macro1"

Please help.


Regards,

Layne



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When opening Excel - get Access (Read-Only) file and error DeltaDagger Setting up and Configuration of Excel 1 October 31st 06 10:22 AM
Opening linked spreadsheet file in Access Art Excel Programming 4 July 1st 05 06:15 PM
Opening Excel from Access Steve Price Excel Programming 2 December 6th 04 01:54 PM
Opening Access from Excel Cindy Excel Programming 4 January 14th 04 01:27 PM
Opening Excel via Access Dave[_32_] Excel Programming 1 October 21st 03 06:23 PM


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"