jean-paul mesters a écrit :


Bonjour,

Je cherche à reproduire la boucle VBA suivante :

For Each Cell In Range("A1:A300")
ActiveSheet.Hyperlinks.Add Anchor:=Cell, Address:="D:\Images\" & Cell.Value
& ".jpg", TextToDisplay:=Cell.Value
Next

Est-ce que quelqu'un a une idée, une piste.

A l'avance merci

jip
Bonsoir,

Je te propose :

Sub Test
   Dim oDocument As Object, oSheet As Object, oCell As Object
   oDocument=ThisComponent
   oSheet=oDocument.Sheets.getByName("Feuille1")
For i = 1 to 300
       Txt = "D:\Images\" & i & ".jpg"
       oCell=oSheet.getCellByPosition(0,i)
       oCell.setValue(i)
       oCell.setString(Txt)
Next i End Sub

Bon surf,
Christian

--
Visitez http://christianwtd.free.fr/ pour débuter avec Calc, d'OpenOffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Répondre à