ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Impoting excel sheet to new workbook (https://www.excelbanter.com/excel-programming/446712-impoting-excel-sheet-new-workbook.html)

kumark

Impoting excel sheet to new workbook
 
HI All,

I have a excel workbook which contains 6-7 sheets. i want to write a vba code .. so that when i run, it should create a new work book on my desktop and import all the 7 sheets from the source Workbook.


Regards
Kumar

Don Guillett[_2_]

Impoting excel sheet to new workbook
 
On Monday, July 30, 2012 2:55:51 AM UTC-5, kumark wrote:
HI All,



I have a excel workbook which contains 6-7 sheets. i want to write a

vba code .. so that when i run, it should create a new work book on my

desktop and import all the 7 sheets from the source Workbook.





Regards

Kumar









--

kumark


Have you considered using saveAS

Auric__

Impoting excel sheet to new workbook
 
Don Guillett wrote:

On Monday, July 30, 2012 2:55:51 AM UTC-5, kumark wrote:

I have a excel workbook which contains 6-7 sheets. i want to write a

vba code .. so that when i run, it should create a new work book on my

desktop and import all the 7 sheets from the source Workbook.


Have you considered using saveAS


Or copying the existing file?

--
Forest? What forest? I just see a bunch of trees!

kumark

Quote:

Originally Posted by Auric__ (Post 1604188)
Don Guillett wrote:

On Monday, July 30, 2012 2:55:51 AM UTC-5, kumark wrote:

I have a excel workbook which contains 6-7 sheets. i want to write a

vba code .. so that when i run, it should create a new work book on my

desktop and import all the 7 sheets from the source Workbook.


Have you considered using saveAS


Or copying the existing file?

--
Forest? What forest? I just see a bunch of trees!






Sub ImportTemplate()
FileCopy "c:\Adventure.xlsm", _
ActiveWorkbook.Path & "Adventureworks.xlsm"

Name "C:\WorkedAdventist.xlsm" As "C:\Documents and Settings\All users\Desktop\Adventist.xlsm"
End Sub


All times are GMT +1. The time now is 12:20 PM.

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