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 Userform problem?

Hi All

I have a userform with first of all four text boxes that enter a customers
details on a sheet no problem see code below. We sell 24 items and have 24
textboxes in 3 rows of 8 e.g. Tb4 thru Tb11 / Tb12 thru Tb19 / Tb20 thru Tb27
.. I would like to put them all on the command button Add1 and for them all to
enter on 3 separate rows Tb4:Tb11 on one row starting at Col "D" / Tb12:Tb19
on the next row starting at Col "D" / Tb20:Tb27 on the next row starting at
Col "D"
We then hopefully have another customer his / her details are added to the
next rows and so on. If any of the 24 Tboxes have nothing entered the vba
should still run as normal.

Private Sub Add1_Click()
Dim ws As Worksheet
Set ws = Worksheets("New")
startrownum = 2
endrownum = 200
For rownum = startrownum To endrownum
If Trim(Sheets("New").Range("A" & Trim(Str(rownum)))) = "" Then
freerownum = rownum
rownum = endrownum
End If
Next rownum
ws.Cells(freerownum, 1).Value = " " & Trim(UserForm1.Tb1.Value) + " " &
Trim(UserForm1.Tb2.Value)
ws.Cells(freerownum, 2).Value = Tb1A.Value
ws.Cells(freerownum, 3).Value = Tb2A.Value




--
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
userform problem Brian Matlack[_104_] Excel Programming 5 July 11th 06 09:57 PM
UserForm Problem the dude[_2_] Excel Programming 2 June 1st 06 08:57 AM
Userform problem Andrew B[_4_] Excel Programming 3 April 26th 06 01:28 AM
Userform from a Userform Problem Adrian Excel Programming 1 October 12th 05 04:57 PM
UserForm Problem mayuss Excel Programming 3 August 9th 04 01:18 PM


All times are GMT +1. The time now is 05:07 AM.

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

About Us

"It's about Microsoft Excel"