Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to copy values to another sheet
Hi
I am trying to copy the contents of the values selected in several comboboxes and textboxes in a form to consecutive lines in a sheet Anyone know where can I find examples for doing this? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to copy values to another sheet
This is assuming that you are developing a database and need to record
details from several entries Dim y As Control For c = 1 to 20 ' assuming 20 pieces of info to return 'set name of worksheet to return data to With Worksheets("Sheet Name") 'finds the next row available Set rng = .Cells(Rows.Count, 1).End(xlUp)(2) 'format 'data location to return to: all the data entry names on your user form go y1, y2 . y20 rng(1, c).Value = Controls("y" & x) 'if they don't then you have to do the following (where items is the name of the textbox etc rng(1,1).value = items.value rng(1,2).value = items2.value If not using a database and only want the number returned once then adapt the following 'this returns a 5*9 matrix of numbers Dim y As Control Dim i, j, x As Integer x = 1 For i = 1 To 10 For j = 1 To 5 Worksheets("Assumptions").Cells(i + 4, j + 1) = Controls("y" & x) x = x + 1 Next j Next i "C. Thies" wrote in message ... Hi I am trying to copy the contents of the values selected in several comboboxes and textboxes in a form to consecutive lines in a sheet Anyone know where can I find examples for doing this? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Macro values to new sheet | New Users to Excel | |||
copy values generated by conditional formula in one sheet to the other work sheet as values | Excel Worksheet Functions | |||
copy values generated by conditional formula in one sheet to the other work sheet as values | Excel Discussion (Misc queries) | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming | |||
Copy Sheet - Paste Values | Excel Programming |