View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default Creating excel files using VBA

Hi,
application.savecopyas "machinename\shareddrive\path\filename.xls"

But what you really need is called a template.
filesave as select "template" as the file type in the drop down box.

Turn on the macro recorder and do...
filenew select the template file.
And you have the code.

--

John
johnf202 at hotmail dot com


"sameerce" wrote in message
...

Hi,
I am working on a VB application which will export the results to an
Excel file. The Excel file generated should also have graphs in it.
To do this I am planning to have a excel file already existing on the
hard drive path which will be having the graphs with reference to
certain rows and columns. The application should make a copy of the
file, rename it and put the file at the same path as the original one.
Later on the application should change the results obtained dynamically
in the workbook, so that the graphs are changed accordingly.

Can anyone tell me how can I make copy of a existing excel file, rename
and save it.

Thanks in advance,

Sameer


--
sameerce
------------------------------------------------------------------------
sameerce's Profile:
http://www.excelforum.com/member.php...fo&userid=8071
View this thread: http://www.excelforum.com/showthread...hreadid=269124