Help with code in access VB

  • Thread starter Junior Carstensen
  • Start date
J

Junior Carstensen

I have been tring to write a code in access to open a
excel file, run a macro, go back to access and run a macro
there. Then back to excel to run another macro. Then stop
code. Reading questions on here and in some books I'm just
getting more confused. Could you help me out? Here is what
I have so far.
Dim returnvalue
Dim strfile
ICdatabase = Current.Application
strfile = "C:\Documents and
Settings\carstensenj\Desktop\Macros.xls"
returnvalue = Shell("C:\Program Files\Microsoft
Office\Office\Macros.xls", 3) 'Open excel file "Macros"
SendKeys "{^}u", True 'Rum macro in excel
file "Macros" and wait
AppActivate ICdatabase, True 'Activate access
XXXXXXXXXXXXX 'Run macro in access
AppActivate strfile, True 'Activate excel
SendKeys "{^}e", True 'Rum macro in excel
file "Macros" and wait

Please help
Helpless
 

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

Top