LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Every 4th Row

Hi All
Can you help me solve the following code problem that I found and altered to
run off my UserForm.

Private Sub Add4_Click()
Dim ws As Worksheet
Set ws = Worksheets("Result")
StartRowNum = 5
EndRowNum = 97
For rownum = StartRowNum To EndRowNum
If Trim(Sheets("Result").Range("B" & Trim(Str(rownum)))) = "" Then
freerownum = rownum
rownum = EndRowNum
End If
Next rownum
ws.Cells(freerownum, 5).Value = Trim(UserForm1.Cb2.Value) + " " &
Trim(UserForm1.Tb40A.Value) + " " & Trim(UserForm1.Tb40B.Value) + " " &
Trim(UserForm1.Tb40C.Value)
End Sub

I select the data from a ListBox and it fills the boxes above on click Add4
it places the data correctly on the sheet -- my problem is that when I select
the next data from the Listbox it overides the previous input -- each time I
fill the TextBoxes from the Listbox I need the data to enter another row in
the same column. For example after starting at Row5 ColE the next data I need
to enter in Row9 ColE then Row13 ColE - so basically its every 4th Row down
to 97. Hope I've explained it properly


--
Many Thanks

Sue
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"