Pour ecrire dans une cellule

  • Thread starter jean-louis.garcia9
  • Start date
J

jean-louis.garcia9

Bonjour
j aimerai a partir d une fonction en VB ecrire dans une cecellule
particuliere j ai tente cela et ca ne marche pas savez vous pourqoiu je suis
avec XP pro merci

Sub ecrire()
dim i as integer
for i = 1 to 10
Cells(i,1) = 2*i
next i
end sub
 
D

Dianne Butterworth

Votre fonction a marche pour moi (Excel97). Peut-etre essayez:

Cells(i,1).Value = 2*i au lieu de Cells(i,1) = 2*i

Aussi, faisez sur que votre fonction is dans un "module" et non pas dans le
code pour "sheet" ou "workbook".
 
J

Jacques Brun

Your subroutine writes numbers 2 to 20 in cells of Range
A1:A10. Is this what you intended to do ?
 
Top