ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multipage Control in a Userform (https://www.excelbanter.com/excel-programming/407193-multipage-control-userform.html)

Adam[_18_]

Multipage Control in a Userform
 
Hi

I have a Userform with a Multipage control on it with 2 pages setup. I
have several Textboxs on each page to be populated by a user. My
problem is i cannot get that infomation entered into the spreadsheet.

text1 on page 1

text2 on page 2

Thanks

Addy



Private Sub CommandButton1_Click()
'On Error GoTo ErrorHandler:

Dim text1 As String
Dim text2 As String

Dim material1 As Range
Dim material2 As Range

text1 = UserForm8.TextBox1.Value
text2 = UserForm8.TextBox2.Value

ActiveCell.Offset(0, 1).Select
Set material1 = Selection

ActiveCell.Offset(0, 1).Select
Set material2 = Selection

material1.Value = text21
material2.Value = text22

end sub

Jim Rech[_2_]

Multipage Control in a Userform
 
Private Sub CommandButton1_Click()
ActiveCell.Offset(0, 1).Value = UserForm8.TextBox1.Value
ActiveCell.Offset(0, 2)Value = UserForm8.TextBox2.Value
end sub

--
Jim
"Adam" wrote in message
...
| Hi
|
| I have a Userform with a Multipage control on it with 2 pages setup. I
| have several Textboxs on each page to be populated by a user. My
| problem is i cannot get that infomation entered into the spreadsheet.
|
| text1 on page 1
|
| text2 on page 2
|
| Thanks
|
| Addy
|
|
|
| Private Sub CommandButton1_Click()
| 'On Error GoTo ErrorHandler:
|
| Dim text1 As String
| Dim text2 As String
|
| Dim material1 As Range
| Dim material2 As Range
|
| text1 = UserForm8.TextBox1.Value
| text2 = UserForm8.TextBox2.Value
|
| ActiveCell.Offset(0, 1).Select
| Set material1 = Selection
|
| ActiveCell.Offset(0, 1).Select
| Set material2 = Selection
|
| material1.Value = text21
| material2.Value = text22
|
| end sub




All times are GMT +1. The time now is 02:56 PM.

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