After Query can a macro Open Excel and a spreadsheet file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a macro which runs a query then performs 'TransferSpreadsheet'. Is
there a way that once it has performed this operation the spreadsheet file
can be opened?
 
Hi

I have a macro which runs a query then performs 'TransferSpreadsheet'. Is
there a way that once it has performed this operation the spreadsheet file
can be opened?

shell environ("comspec") &" /c " &PathName ,vbNormalFocus
 
Hi Andi,

I'm a newb at Access, can you tell me what I have to do with this code?
 
Hi Andi,

I'm a newb at Access, can you tell me what I have to do with this code?

sorry I have never used macros, I use vba and shell this is a vba
command

environ("comspec") is the pathName of the command.com (cmd.com or DOS
Window)

/c means close the Dos Window

and pathname should be the path and the name of the xls

maybe you find how to run a external program with macros or somebody
else knows it and will answer you
 
In the main datadase window create a new module (eg called code1). Enter the
code provided by Andi Mayer. Then in a macro select the command RunCode and
select code1 in the function name box.

enrico
 

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