>>The following is from my class that manages Excel:
>>
>>
>>* Method: NextSheet
>>with This
>> local loWorkbook
>> loWorkbook = .oSheet.Parent
>> .nActiveSheet = .nActiveSheet + 1
>> if This.nActiveSheet > loWorkbook.Sheets.Count
>> loWorkbook.Sheets.Add(NULL, loWorkbook.Sheets(loWorkbook.Sheets.Count))
>> .oSheet = loWorkbook.ActiveSheet
>> else
>> .oSheet = loWorkbook.Sheets(This.nActiveSheet)
>> endif
>> .nRow = 1
>> .nCol = 1
>>endwith
>>
>
>Hi Hilmar,
>
> thanks for your quick reply, i tried to incorporate this code but "Unknown Member oSheet" displayed on my screen?
>
>thanks
That is part of a larger class, and you have to adapt it.
.oSheet is a property of the class, which already points to a spreadsheet - as a result of previous Automation work. You can replace it with a variable, like loSheet, which also points to a spreadsheet.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)