Pour ecrire dans une cellule

  • Thread starter Thread starter jean-louis.garcia9
  • Start date 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
 
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".
 
Your subroutine writes numbers 2 to 20 in cells of Range
A1:A10. Is this what you intended to do ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top