#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default 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?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default 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!!!!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default 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!!!!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
a macro that Formats a textbox based on value in a cell txm49 Excel Worksheet Functions 1 June 6th 07 02:36 PM
TextBox control stops displaying linked cell content bda75 Excel Discussion (Misc queries) 0 January 24th 07 05:26 PM
pasting textbox value to active cell ASU Excel Discussion (Misc queries) 2 June 23rd 06 03:58 PM
Textbox.caption to cell if empty, how? WTG Excel Worksheet Functions 1 February 27th 05 09:30 AM
Textbox.caption to cell if empty, how? WTG Excel Discussion (Misc queries) 2 February 27th 05 04:03 AM


All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"