View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Loops or Do/ while or STEP !!!! A better solution

Const xlup As Long = -4162
LastUsedRow = xclSheetA.cells(rows.count,1).end(xlup)
icnt = LastUsedRow
xclSheetA.Cells(icnt, 1) = txtIK1.Text
xclSheetA.Cells(icnt, 2) = txtIK2.Text
xclSheetA.Cells(icnt, 3) = txtIK4.Text


--
Regards,
Tom Ogilvy

"Kevan Hughes" wrote in message
...
' add some data
For icnt = 3 To 10
xclSheetA.Cells(2, 1) = txtIK1.Text
xclSheetA.Cells(2, 2) = txtIK2.Text
xclSheetA.Cells(2, 3) = txtIK4.Text
?????????

Excel aint my bag..Have 3 columns as above which gets data from my VB

program.
I am trying to get it to wait after it has passed the values, then press

my
calculate button again, which of course will require some form of coding i
relation to the BAS which the code above is from. All values passed after
this, ( 3 values, 3 rows ) Would then go to .cells(3,1)(3,2)(3,3) wait for
next calc. (4,1)(4,2)(4,3) etc etc until quit command executed..

Understand ? Hope so, just need some pointers to get me going..

Thanks