>>Hi to All,
>>
>> How to create new worksheet in excel co'z my record's over 65,000?
>>
>>Thanks in Advance,
>>Ryan
>
>Basically, if you have an object that points to a worksheet, get its parent (the workbook), and select the next sheet (creating a new one if necessary), from that object, then select the new sheet.
>
>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