On Mon, 19 Nov 2007 12:40:02 -0800, Sandy <(E-Mail Removed)>
wrote:
>Hi
>The following bit of code has been working previously excel2003
>
>Dim wks as worksheet
>Dim actWkbk As Workbook
>Set actWkbk = ActiveWorkbook
>With act wkbk
>.Worksheets("Sheet1").copy
>End with
>
> now in 2007 I am getting Method 'Copy' of object '_Worksheet failed'
>
>What has changed?
>Thanks!
Could it be the <space> between 'act' and 'wkbk' ?
Probably combined with no Option Explicit statement.
--ron
|