Opening an excel file from access with VB

Rik_StHelens

Registered User.
Local time
Today, 17:31
Joined
Sep 15, 2009
Messages
164
Hi,

I have no real knowledge of VB. I was hoping to open a specific excel file from an access form. Access 2007 doesn't have the RunApp macro like previous versions did, and i was wondering how to write some VB to open the file i need

I would pull the file into access, but for this project it is easier to run the spreadsheet seperately.

The file path is "T:\IV NVQ Files\Assessor Monitoring Spreadsheet\"


Many thanks for your help
 
See the post at the end of this thread - http://www.access-programmers.co.uk/forums/showthread.php?t=130648

It seems the macro action is still available, just not displayed by default as is not a 'trusted' macro action.


Thanks for your reply.

I've entered T:\IV NVQ Files\Assessor Monitoring Spreadsheet.xls on the command line but i get an error message saying the path to the application is invalid. It shouldn't be though so im a bit confused as to why
 
Thanks for your reply.

I've entered T:\IV NVQ Files\Assessor Monitoring Spreadsheet.xls on the command line but i get an error message saying the path to the application is invalid. It shouldn't be though so im a bit confused as to why


I have now managed to get excel to open, but not the specific file (i copied your code from the other post you linked me to...
 
Code:
C:\Program Files\Microsoft OfficeXP\Office10\excel.exe "K:\Rapid\BST - general\Release Testing\Testing Database\Progress Stats Template.xls"

This is what I use in the Command Line, just replace the file path for Excel app with your own and change the file path for your Spreadsheet
 
I have now managed to get excel to open, but not the specific file (i copied your code from the other post you linked me to...



Never mind i didnt realise excel uses xlsx as its file extension not xls.

my bad

thanks again
 
Ahhh, its a 2007 Spreadsheet, I assumed your file ext was correct and that the Spreadsheet was created in a previous version.

Anyway, sorted now so well done!
 

Users who are viewing this thread

Back
Top Bottom