View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default "Object Required"

If you want the first letter of whatever is in txtBankName to be in the
active cell (column offset 0) then try this
Counter=0
Do
If Counter<24 Then
ActiveCell.Offset(0,Counter)=Mid(txtBankName,Count er+1, 1)
Counter=Counter+1
End If
Loop Until Counter = 24

"BOBODD" wrote:

As a newbie to VBA coding, I'm still strugling with the syntax. The loop
below is to fill in bank forms where each letter is in a seperate box.

Counter.Value = 0
Do
If Counter < 24 Then
ActiveCell.Offset(0, Counter) = Mid(txtBankName, Counter, 1)
Counter = Counter + 1
End If
Loop Until Counter = 24

I can't work out how to reference my counter so that the offset and the
letter change with each iteration. Any help would be appreciated.