ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   excel 2010 + copy array (https://www.excelbanter.com/excel-discussion-misc-queries/446833-excel-2010-copy-array.html)

kevcar40

excel 2010 + copy array
 
Hi
I have a workbook created in excel 2003
which uses Vba to copy worksheets and save them as a stand alone work workbook
the code is
ThisWorkbook.Worksheets(Array("sheet1")).Copy
the problem is this is crashing in excel 2010
does anyone know the reason whyand what the solution is please


thanks

kevin

Don Guillett[_2_]

excel 2010 + copy array
 
On Monday, August 13, 2012 2:58:57 AM UTC-5, kevcar40 wrote:
Hi

I have a workbook created in excel 2003

which uses Vba to copy worksheets and save them as a stand alone work workbook

the code is

ThisWorkbook.Worksheets(Array("sheet1")).Copy

the problem is this is crashing in excel 2010

does anyone know the reason whyand what the solution is please





thanks



kevin


Why you would have an array of ONE I don't know but your code did work in my xl2010

kevcar40

excel 2010 + copy array
 
On Monday, August 13, 2012 8:58:57 AM UTC+1, kevcar40 wrote:
Hi I have a workbook created in excel 2003 which uses Vba to copy worksheets and save them as a stand alone work workbook the code is ThisWorkbook.Worksheets(Array("sheet1")).Copy the problem is this is crashing in excel 2010 does anyone know the reason whyand what the solution is please thanks kevin


Don
Thanks for reply
the reason i use array is this is the way i was taught to copy a sheet out of a workbook.
if there is another method please let me know

thanks

kevin

Don Guillett[_2_]

excel 2010 + copy array
 
On Monday, August 13, 2012 2:58:57 AM UTC-5, kevcar40 wrote:
Hi

I have a workbook created in excel 2003

which uses Vba to copy worksheets and save them as a stand alone work workbook

the code is

ThisWorkbook.Worksheets(Array("sheet1")).Copy

the problem is this is crashing in excel 2010

does anyone know the reason whyand what the solution is please




thanks



kevin



ThisWorkbook.Worksheets("sheet1").Copy


All times are GMT +1. The time now is 10:08 PM.

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