LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Transfer Data from UserForm to Worksheet

I have a total of 60 TextBoxes I am wondering if there is an easier way,
using a loop, to transfer the information from the UserFrom to the Worksheet
(in a row).

Private Sub cmdEnter_Click()
On Error Resume Next

Range(Worksheets("Import").Cells(Rows.Count, "A").End(xlUp).Address).Select
ActiveCell.Offset(1, 0).Select

If ActiveCell = "" Then

ActiveCell.Value = txtLastName.Value
ActiveCell.Offset(0, 1) = txtFirstName.Value
ActiveCell.Offset(0, 2) = txtMR.Value
ActiveCell.Offset(0, 3) = txtDate.Value
'skip Column 4, but I could end up using it, if it makes it easier to loop
ActiveCell.Offset(0, 5) = TextBox0.Value
ActiveCell.Offset(0, 6) = TextBox1.Value
ActiveCell.Offset(0, 7) = TextBox2.Value
ActiveCell.Offset(0, 8) = TextBox3.Value
ActiveCell.Offset(0, 9) = TextBox4.Value
ActiveCell.Offset(0, 10) = TextBox5.Value
€˜etc., etc., etc.,
End If
End Sub

Thanks,
Ryan---


--
RyGuy
 
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
transfer data from worksheet to another dave Excel Discussion (Misc queries) 1 September 4th 08 06:14 AM
Excel Worksheet transfer of Data MaggieB New Users to Excel 2 July 23rd 07 04:38 PM
transfer data from word userform to excel Jade Excel Programming 1 January 29th 07 09:15 PM
Transfer data from worksheet to array Pradip Jain Excel Programming 6 October 24th 06 09:03 PM
Transfer data from one worksheet to another CheriT63 Excel Programming 1 April 5th 06 03:17 AM


All times are GMT +1. The time now is 03:06 PM.

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"