ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating excel files using VBA (https://www.excelbanter.com/excel-programming/313501-creating-excel-files-using-vba.html)

sameerce[_23_]

Creating excel files using VBA
 

Hi,
I am working on a VB application which will export the results to a
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 th
hard drive path which will be having the graphs with reference t
certain rows and columns. The application should make a copy of th
file, rename it and put the file at the same path as the original one
Later on the application should change the results obtained dynamicall
in the workbook, so that the graphs are changed accordingly.

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

Thanks in advance,

Samee

--
sameerc
-----------------------------------------------------------------------
sameerce's Profile: http://www.excelforum.com/member.php...nfo&userid=807
View this thread: http://www.excelforum.com/showthread.php?threadid=26912


jaf

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





All times are GMT +1. The time now is 09:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com