Grazie per il consiglio, ed un grazie a Voi tutti
ho provato e son riuscito inserendo l'istruzione come sotto riportata  in 
grassetto

 Sub MainCarlo
  Dim Doc As object
 Dim Sheet As object
 Dim Cell As object
    Dim i As integer 
 Doc = ThisComponent
' Sheet = Doc.Sheets(0)( usata prima da me e con l'errore )
 Sheet = Doc.Sheets.getbyindex(0)
    For i = 1 to 10
 Cell = Sheet.getCellByPosition(i,i)
 Cell.String = "Test"
    next
 End Sub

 Un saluto
Carlo Mintalto

Rispondere a