Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default 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
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
Copy Macro values to new sheet Crowbar via OfficeKB.com New Users to Excel 0 December 20th 05 10:10 PM
copy values generated by conditional formula in one sheet to the other work sheet as values ramana Excel Worksheet Functions 1 October 5th 05 01:04 PM
copy values generated by conditional formula in one sheet to the other work sheet as values bobby Excel Discussion (Misc queries) 1 October 5th 05 12:18 PM
How do i compare values from two sheet and copy & paste if values match? rozb Excel Programming 0 March 5th 04 12:06 AM
Copy Sheet - Paste Values Stone[_2_] Excel Programming 1 January 7th 04 03:15 PM


All times are GMT +1. The time now is 08:47 PM.

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"