Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Automated userform inputs to the spreadsheet

I am using a userform to input 17 different pieces of data into 17 textboxes/comboboxes. When the data has been input, and I presses a button, I want it to place this data into cells on my spreadsheet. The first piece of data in cell "B2", the second into "C2" and so on down the row. Each of the input boxes has a different name which I gave it to make it easier for me to keep track of, like "username" instead of "combobox1", etc. Is there an automated way of having it input the data into the correct cells?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Automated userform inputs to the spreadsheet

You can use this

Sheets("Sheet1").Range("B2").Value = Me.TextBox1.Value


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dan" wrote in message ...
I am using a userform to input 17 different pieces of data into 17 textboxes/comboboxes. When the data has been input, and I

presses a button, I want it to place this data into cells on my spreadsheet. The first piece of data in cell "B2", the second into
"C2" and so on down the row. Each of the input boxes has a different name which I gave it to make it easier for me to keep track of,
like "username" instead of "combobox1", etc. Is there an automated way of having it input the data into the correct cells?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Automated userform inputs to the spreadsheet

No automatic way.

You have to write each value.

If you textboxes had less meaningful names, such as combobox1, you might be
able to shorten your code.

if iempty(Range("B2")) then
set rng = Range("B2")
elseif isempty(Range("B3")) then
set rng = Range("B3")
Else
set rng = Range("B2").End(xldown)(2)
End if
rng(1,1).Value = Control1.Text
rng(1,2).Value = Control2.Text
rng(1,3).Value = Control3.Text

replace control1 and so forth with your meaningful names.

--
Regards,
Tom Ogilvy
"Dan" wrote in message
...
I am using a userform to input 17 different pieces of data into 17

textboxes/comboboxes. When the data has been input, and I presses a button,
I want it to place this data into cells on my spreadsheet. The first piece
of data in cell "B2", the second into "C2" and so on down the row. Each of
the input boxes has a different name which I gave it to make it easier for
me to keep track of, like "username" instead of "combobox1", etc. Is there
an automated way of having it input the data into the correct cells?


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
Locking Cells in an Automated SpreadSheet Mick Henn[_2_] Excel Discussion (Misc queries) 1 May 7th 09 12:46 PM
Multiple inputs on a spreadsheet BE Excel Discussion (Misc queries) 1 May 23rd 08 12:03 AM
Populating word document from userform inputs. David Goodall Excel Programming 1 December 29th 03 11:25 PM
userform inputs Jo[_4_] Excel Programming 1 September 19th 03 11:36 PM
userform inputs Jouni Excel Programming 0 September 19th 03 10:51 PM


All times are GMT +1. The time now is 03:26 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"