ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA cell to textbox (https://www.excelbanter.com/excel-discussion-misc-queries/163028-vba-cell-textbox.html)

[email protected]

VBA cell to textbox
 
I'm having an issue if anyone could help.
I'm very new to VB/VBA and I'm trying to Search a spreadsheet for
specific text in column A,
when it finds that data make the cell that data is in the Active
cell , then move to column b the same row the data was on and select
the text there, Then paste it to a textbox, then it would have to go
to column d and do the same, How would i go about doing this?


excelent

VBA cell to textbox
 
Make TextBox1, TextBox2 and TextBox3 on a Form
Doubleclick on TextBox1
Insert folowing code except first and last line :

Start Form and put searc value in TextBox1


Private Sub TextBox1_Change()
On Error Resume Next
Me.TextBox2 = "": Me.TextBox3 = ""
Me.TextBox2 = Range("A1:A10").Find(Me.TextBox1, LookIn:=xlValues).Offset(0, 1)
Me.TextBox3 = Range("A1:A10").Find(Me.TextBox1, LookIn:=xlValues).Offset(0, 3)
End Sub


" skrev:

I'm having an issue if anyone could help.
I'm very new to VB/VBA and I'm trying to Search a spreadsheet for
specific text in column A,
when it finds that data make the cell that data is in the Active
cell , then move to column b the same row the data was on and select
the text there, Then paste it to a textbox, then it would have to go
to column d and do the same, How would i go about doing this?



[email protected]

VBA cell to textbox
 
On Oct 22, 12:55 pm, excelent
wrote:
Make TextBox1, TextBox2 and TextBox3 on a Form
Doubleclick on TextBox1
Insert folowing code except first and last line :

Start Form and put searc value in TextBox1

Private Sub TextBox1_Change()
On Error Resume Next
Me.TextBox2 = "": Me.TextBox3 = ""
Me.TextBox2 = Range("A1:A10").Find(Me.TextBox1, LookIn:=xlValues).Offset(0, 1)
Me.TextBox3 = Range("A1:A10").Find(Me.TextBox1, LookIn:=xlValues).Offset(0, 3)
End Sub

" skrev:



I'm having an issue if anyone could help.
I'm very new to VB/VBA and I'm trying to Search a spreadsheet for
specific text in column A,
when it finds that data make the cell that data is in the Active
cell , then move to column b the same row the data was on and select
the text there, Then paste it to a textbox, then it would have to go
to column d and do the same, How would i go about doing this?- Hide quoted text -


- Show quoted text -


You have made it work THANK YOU!!!!


excelent

VBA cell to textbox
 
ur welcome :-)

" skrev:

On Oct 22, 12:55 pm, excelent
wrote:
Make TextBox1, TextBox2 and TextBox3 on a Form
Doubleclick on TextBox1
Insert folowing code except first and last line :

Start Form and put searc value in TextBox1

Private Sub TextBox1_Change()
On Error Resume Next
Me.TextBox2 = "": Me.TextBox3 = ""
Me.TextBox2 = Range("A1:A10").Find(Me.TextBox1, LookIn:=xlValues).Offset(0, 1)
Me.TextBox3 = Range("A1:A10").Find(Me.TextBox1, LookIn:=xlValues).Offset(0, 3)
End Sub

" skrev:



I'm having an issue if anyone could help.
I'm very new to VB/VBA and I'm trying to Search a spreadsheet for
specific text in column A,
when it finds that data make the cell that data is in the Active
cell , then move to column b the same row the data was on and select
the text there, Then paste it to a textbox, then it would have to go
to column d and do the same, How would i go about doing this?- Hide quoted text -


- Show quoted text -


You have made it work THANK YOU!!!!




All times are GMT +1. The time now is 08:21 PM.

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