Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok, continuing on with my VBA Tutorial...
I have a row with 5 cells that have something in each one. I want t take those 5 cels and populate 5 text boxes. I have created a userform where do I begin to pull the information from the current worksheet -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Userform_Initialize()
With Worksheets("Sheet2") Textbox1.Text = .Range("A21").Value Textbox2.Text = .Range("B9").Value Textbox3.Text = .Range("M32").Value Textbox4.Text = .Range("Z1").Value Textbox5.Text = .Range("F10").Value End With End Sub Goes in the Userform code module -- Regards, Tom Ogilvy "stck2mlon " wrote in message ... Ok, continuing on with my VBA Tutorial... I have a row with 5 cells that have something in each one. I want to take those 5 cels and populate 5 text boxes. I have created a userform, where do I begin to pull the information from the current worksheet? --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something like:
Textbox1.Text = Sheets("Sheet1").Range("A1").Value Textbox2.Text = Sheets("Sheet1").Range("A2").Value Textbox3.Text = Sheets("Sheet1").Range("A3").Value Textbox4.Text = Sheets("Sheet1").Range("A4").Value Textbox5.Text = Sheets("Sheet1").Range("A5").Value probably placed in your UserForm_Initialize() event procedure. -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What if I want to pick a range of items from a combobox, example selec
company name and get their telephone number? Thanks for everything s far -- Message posted from http://www.ExcelForum.com |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Could you elaborate? Remember, I'm not looking at your spreadsheet...
What you ask sounds simple, but I have no idea where to start. -- Message posted from http://www.ExcelForum.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry about that...
I want to have a small userform with a dropdown that has a list of th clients I work with. I use... Private Sub UserForm_Initialize() Dim i& With ThisWorkbook.Sheets("Active Collection") For i& = 3 To 300 cmbClient.AddItem .Cells(i&, 4).Value Next i& End With cmbClient.ListIndex = 0 End Sub to get the list. I would like it to call another userform that has five textboxe populated with the remaining information that is in the rows calle above...does this help -- Message posted from http://www.ExcelForum.com |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this:
Code ------------------- Private Sub ComboBox1_Click UserForm2.Show End Sub 'Second userform (UserForm2) Private Sub UserForm_Initialize() Dim i as Long i = UserForm1.ComboBox1.ListIndex TextBox1.Text = Sheets("Active Collection").Cells(i+3,5).Value TextBox2.Text = Sheets("Active Collection").Cells(i+3,6).Value 'etc. Next End Su ------------------- You may need to mess around with the i+3 and change to i+4 or i+2 t get it to match up. Also, the ,5 and ,6 should reflect the column with your data. -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
reverse value | Excel Worksheet Functions | |||
reverse value | Excel Worksheet Functions | |||
to reverse a column | Excel Worksheet Functions | |||
Reverse Sum | Excel Discussion (Misc queries) | |||
reverse of concatenate | Excel Discussion (Misc queries) |