Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass data from UserForm to spreadsheet
Hi. Ive just been introduced to userforms. Neat! I am familiar with
vba on a beginner level. To keep it simple, I have a userform that asks for 2 numbers to be iputed into textboxes and I want to pass that to column 1 and 2. Is there an easy way of doing this so that the data is sent to the next blank cell on the bottom of column or top top of column. In the past Ive insert a row so data would be moved down or searched out the bottom blank cell- VERY inefficient. Thanks Mike Private Sub CommandButton1_Click() ' on user form Dim b As Single Dim a As Single b = TextBox2.Value a = TextBox1.Value Cells(1, 1) = a Cells(1, 2) = b |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass data from UserForm to spreadsheet
Debra Dalgleish has some notes that may help:
http://contextures.com/xlUserForm02.html susan wrote: Hi. Ive just been introduced to userforms. Neat! I am familiar with vba on a beginner level. To keep it simple, I have a userform that asks for 2 numbers to be iputed into textboxes and I want to pass that to column 1 and 2. Is there an easy way of doing this so that the data is sent to the next blank cell on the bottom of column or top top of column. In the past Ive insert a row so data would be moved down or searched out the bottom blank cell- VERY inefficient. Thanks Mike Private Sub CommandButton1_Click() ' on user form Dim b As Single Dim a As Single b = TextBox2.Value a = TextBox1.Value Cells(1, 1) = a Cells(1, 2) = b -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pass variable from module to userform and back | Excel Programming | |||
Pass public variable from one userform to a second... | Excel Programming | |||
Pass Data from List Boxes in Userform | Excel Programming | |||
can a userform pass an argument? | Excel Programming | |||
How to pass arguments from ThisWorkbook to a UserForm | Excel Programming |