Your talking about VBA and the OP is talking about .NET.

--
Regards,
Tom Ogilvy


"paul.robinson@it-tallaght.ie" wrote:

> Hi
> Worksheet and workbook are not good variable names as they are objects
> in Excel VBA. If you want to create a new worksheet in your workbook
> try:
>
> Set myWorkSheet = myWorkBook.WorkSheets.Add
>
> where you might have done
> Set myWorkBook = Application.Workbooks("Tester")
> or
> Set myWorkBook = ActiveWorkBook
>
> look at the parameters in the Add method for control over where it goes
> in the workbook.
>
> regards
> Paul
>
>