Open Excel Spreadsheet VBA code .......

  • Thread starter Thread starter Mikey C
  • Start date Start date
M

Mikey C

Hi folks

Can anybody tell me where I'm going wrong with this? I have used the
following code (as part of a larger expression) to open an excel
document:

CreateObject ("Excel.Application")
Set objectVarName = GetObject("P:\Competitor Analysis\Competitor
Analysis Database\Financial Data Import.xls")
GetObject ("P:\Competitor Analysis\Competitor Analysis
Database\Financial Data Import.xls")
Visible = True

I have already made the code to transfer the details I need to a
spreadsheet, I just can't figure the code to then open that sheet
afterwards!

Thanks

Mike
 
Mike,

If I understand you correctly, you want something like this:

Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open ("P:\PATH_TO_YOUR_FILE.xls")
objExcel.Visible = True
Set objExcel = Nothing

Hope it helps,
Tom
 

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