View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kevin H. Stecyk[_2_] Kevin H. Stecyk[_2_] is offline
external usenet poster
 
Posts: 43
Default Moving Sheets To A Different Workbook XL2003

Hi,

XL 2003, Windows XP.

I have a question regarding moving sheets to a different workbook.

Sub Blah()

Dim oActiveSheet As Object

blah blah blah

Sheets("Duplicate").Copy Befo=Sheets("Duplicate")
Set oActiveSheet = ActiveSheet

oActiveSheet.Move
after:=Workbooks("2006.05.30Presentation.xls").She ets(Sheets.Count)

End Sub

On the last statement, I get a Run-time error '9': Subscript out of range.

Where did I go wrong? The other workbooks is named
"2006.05.30Presentation.xls". I want to move oActiveSheet from WorkbookA to
2006.05.30Presentation.xls at the very end.


Thank you.

Best regards,
Kevin