ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET (https://www.excelbanter.com/excel-programming/286973-passing-data-user-form-excel-spreadsheet.html)

No Name

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 
HOW DO I DO IT?

Bob Phillips[_6_]

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 

Range("A1").Value = Userform1.TextBox1.Text

as an example. More specific questions might help.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
HOW DO I DO IT?




Ron de Bruin

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 
You can also place this line in the click event of a button on the userform

ThisWorkbook.Sheets("Sheet1").Range("a1").Value = Me.TextBox1.Value



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



wrote in message ...
HOW DO I DO IT?




EXCELLENT1

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 
You can also place this line in the click event of a button on th
userform

ThisWorkbook.Sheets("Sheet1").Range("a1").Value = Me.TextBox1.Value

That is my intention.

the workbook is called book1 and the worksheet is called sheet1.

column 1 is where I want to place the RGA number.

my userform is called frmRGAInput and the text box on the form for th
RGA number is called txtRGANum

I entered:

Private Sub cmdCommit_Click()

ThisWorkbook.Sheets("Sheet1").Range("a1").Value
frmRGAInput.txtRGANum.Value
End Sub

and it worked, how do I set it up so that every time I click the O
button it enters the data on the next row of the excel sheet

--
Message posted from http://www.ExcelForum.com


No Name

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 
You can also place this line in the click event of a
button on the userform

ThisWorkbook.Sheets("Sheet1").Range("a1").Value =
Me.TextBox1.Value

That is my intention.

the workbook is called book1 and the worksheet is called
sheet1.

column 1 is where I want to place the RGA number.

my userform is called frmRGAInput and the text box on the
form for the RGA number is called txtRGANum

I entered:

Private Sub cmdCommit_Click()

ThisWorkbook.Sheets("Sheet1").Range("a1").Value =
frmRGAInput.txtRGANum.Value
End Sub

and it worked, how do I set it up so that every time I
click the OK button it enters the data on the next row of
the excel sheet?

Also, how can i get this specific form to pop up when
Book1 is openned?


Bob Phillips[_6_]

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 
Bit different to what you initially asked!

Is This what you want?

Private Sub cmdCommit_Click()

iRow = Cells(Rows.Count, "A").End(xlUp).Row
If iRow = 1 And Range("A1") = "" Then
iRow = 1
Else
iRow = iRow + 1
End If
ThisWorkbook.Sheets("Sheet1").Cells(iRow, "A").Value =
frmRGAInput.txtRGANum.Value

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
You can also place this line in the click event of a
button on the userform

ThisWorkbook.Sheets("Sheet1").Range("a1").Value =
Me.TextBox1.Value

That is my intention.

the workbook is called book1 and the worksheet is called
sheet1.

column 1 is where I want to place the RGA number.

my userform is called frmRGAInput and the text box on the
form for the RGA number is called txtRGANum

I entered:

Private Sub cmdCommit_Click()

ThisWorkbook.Sheets("Sheet1").Range("a1").Value =
frmRGAInput.txtRGANum.Value
End Sub

and it worked, how do I set it up so that every time I
click the OK button it enters the data on the next row of
the excel sheet?

Also, how can i get this specific form to pop up when
Book1 is openned?




No Name

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 

Bit different to what you initially asked!

Is This what you want?

Private Sub cmdCommit_Click()

iRow = Cells(Rows.Count, "A").End(xlUp).Row
If iRow = 1 And Range("A1") = "" Then
iRow = 1
Else
iRow = iRow + 1
End If
ThisWorkbook.Sheets("Sheet1").Cells

(iRow, "A").Value =
frmRGAInput.txtRGANum.Value

End Sub


Thank you for the response.

Now, going a step further I have 10 fields per record
that I'll be inputing data for. How can I make this work
for each field so that a new row is entered.


Bob Phillips[_6_]

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...

Bit different to what you initially asked!

Is This what you want?

Private Sub cmdCommit_Click()

iRow = Cells(Rows.Count, "A").End(xlUp).Row
If iRow = 1 And Range("A1") = "" Then
iRow = 1
Else
iRow = iRow + 1
End If
ThisWorkbook.Sheets("Sheet1").Cells

(iRow, "A").Value =
frmRGAInput.txtRGANum.Value

End Sub


Thank you for the response.

Now, going a step further I have 10 fields per record
that I'll be inputing data for. How can I make this work
for each field so that a new row is entered.




Bob Phillips[_6_]

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 
It's being driven by a button. Where does the fields come into it?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...

Bit different to what you initially asked!

Is This what you want?

Private Sub cmdCommit_Click()

iRow = Cells(Rows.Count, "A").End(xlUp).Row
If iRow = 1 And Range("A1") = "" Then
iRow = 1
Else
iRow = iRow + 1
End If
ThisWorkbook.Sheets("Sheet1").Cells

(iRow, "A").Value =
frmRGAInput.txtRGANum.Value

End Sub


Thank you for the response.

Now, going a step further I have 10 fields per record
that I'll be inputing data for. How can I make this work
for each field so that a new row is entered.




No Name

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 

-----Original Message-----
It's being driven by a button. Where does the fields

come into it?

for instance,

this is going to be a RGA input form with RGA number,
customer number, date, notes, action taken, etc....fields
on it and I want to pass these fields to a column
(record).

Ron de Bruin

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 
Here are some sources of information:

http://support.microsoft.com/default.aspx?kbid=161514
XL97: How to Use a UserForm for Entering Data

http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"EXCELLENT1 " wrote in message ...
You can also place this line in the click event of a button on the
userform

ThisWorkbook.Sheets("Sheet1").Range("a1").Value = Me.TextBox1.Value

That is my intention.

the workbook is called book1 and the worksheet is called sheet1.

column 1 is where I want to place the RGA number.

my userform is called frmRGAInput and the text box on the form for the
RGA number is called txtRGANum

I entered:

Private Sub cmdCommit_Click()

ThisWorkbook.Sheets("Sheet1").Range("a1").Value =
frmRGAInput.txtRGANum.Value
End Sub

and it worked, how do I set it up so that every time I click the OK
button it enters the data on the next row of the excel sheet?


---
Message posted from http://www.ExcelForum.com/




Brian

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 
If you use a PDF form you can use the FDF Decoder to parse the information
and create a CSV file to import to Excel.
You can get more information on FDF Decoder at http://www.spotteddingo.com
wrote in message
...

-----Original Message-----
It's being driven by a button. Where does the fields

come into it?

for instance,

this is going to be a RGA input form with RGA number,
customer number, date, notes, action taken, etc....fields
on it and I want to pass these fields to a column
(record).




Tom Ogilvy

PASSING DATA FROM USER FORM TO EXCEL SPREADSHEET
 

XL97: How to Use a UserForm for Entering Data (Q161514)
http://support.microsoft.com/?id=161514

XL2000: How to Use a UserForm for Entering Data (Q213749)
http://support.microsoft.com/?id=213749

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.


--
Regards,
Tom Ogilvy

wrote in message
...

-----Original Message-----
It's being driven by a button. Where does the fields

come into it?

for instance,

this is going to be a RGA input form with RGA number,
customer number, date, notes, action taken, etc....fields
on it and I want to pass these fields to a column
(record).





All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com