Windows 7 - excel 2010 + copy array

Asked By kevcar40 on 13-Aug-12 03:58 AM
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 replied to kevcar40 on 13-Aug-12 09:13 AM
Why you would have an array of ONE I do not know but your code did work in my xl2010
kevcar40 replied to kevcar40 on 14-Aug-12 07:37 AM
ets and save them as a stand alone work workbook the code is ThisWorkbook.W=
orksheets(Array("sheet1")).Copy the problem is this is crashing in excel 20=
10 does anyone know the reason whyand what the solution is please thanks ke=
vin

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=20

thanks=20

kevin
Don Guillett replied to kevcar40 on 14-Aug-12 02:10 PM
ThisWorkbook.Worksheets("sheet1").Copy