Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.programming
external usenet poster
 
Posts: 411
Default VBA Cell to TextBox

I'm not clear. What purpose would the text box serve?

In excel 2000, I don't usually paste information into a text box
because it has a linked cell property. I don't know about later
versions.

Dan



On Oct 22, 10:18 am, wrote:
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.programming
external usenet poster
 
Posts: 58
Default VBA Cell to TextBox


I'm using excel 2003, and I have a userform that needs to gather data,
there are 10 different textboxes
Some of them will have information on the sheet, i just dont know how
to make it search find the cell, save what row its on then increment
the columns, pull the data from the cells and put them into the
textbox i was thinking maybe do a
double loop where you set a high level loop to count through the
rows, then the second loop inside that one that would count through
the cells? But I'm not really sure how to do that :|

On Oct 22, 12:45 pm, dan dungan wrote:
I'm not clear. What purpose would the text box serve?

In excel 2000, I don't usually paste information into a text box
because it has a linked cell property. I don't know about later
versions.

Dan

On Oct 22, 10:18 am, wrote:



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 -



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default VBA Cell to TextBox

Here is one way to do it. I had to put a delay in to keep the sub from
closing before the value was posted. You might be able to play with it and
get rid of the delay.
The line feed Chr(10) shows up as a paragraph symbol in the text box, but it
does put both values in it.

Sub findnpaste()
Dim myData As Range
lastRow = Worksheets(1).Cells(Rows.Count, 1).End(xlUp).Row 'Get last row
number
Set myData = Worksheets(1).Range("A2:A" & lastRow).Find("Specific text",
LookIn:=xlValues)
If Not myData Is Nothing Then
newData = myData.Offset(0, 1) & Chr(10) & myData.Offset(0, 3)
Worksheets(1).TextBox1.Value = newData
TenthSecDly
End If
End Sub

Public Function TenthSecDly()
s = Timer + 0.1
Do While Timer < s
DoEvents
Loop
End Function

" wrote:


I'm using excel 2003, and I have a userform that needs to gather data,
there are 10 different textboxes
Some of them will have information on the sheet, i just dont know how
to make it search find the cell, save what row its on then increment
the columns, pull the data from the cells and put them into the
textbox i was thinking maybe do a
double loop where you set a high level loop to count through the
rows, then the second loop inside that one that would count through
the cells? But I'm not really sure how to do that :|

On Oct 22, 12:45 pm, dan dungan wrote:
I'm not clear. What purpose would the text box serve?

In excel 2000, I don't usually paste information into a text box
because it has a linked cell property. I don't know about later
versions.

Dan

On Oct 22, 10:18 am, wrote:



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 -




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default VBA Cell to TextBox

If you used a ListBox, you could use the AddItem method ot increment the
list. Unfortunately, the TextBox does not accomodate the add item method. I
did think it would acknowledge a line feed, but apparently, the one from the
control tool box doesn't do that either. Unless you intend to have the user
type into or delete from the text box, I would give some serious
consideration to using the ListBox.

" wrote:


I'm using excel 2003, and I have a userform that needs to gather data,
there are 10 different textboxes
Some of them will have information on the sheet, i just dont know how
to make it search find the cell, save what row its on then increment
the columns, pull the data from the cells and put them into the
textbox i was thinking maybe do a
double loop where you set a high level loop to count through the
rows, then the second loop inside that one that would count through
the cells? But I'm not really sure how to do that :|

On Oct 22, 12:45 pm, dan dungan wrote:
I'm not clear. What purpose would the text box serve?

In excel 2000, I don't usually paste information into a text box
because it has a linked cell property. I don't know about later
versions.

Dan

On Oct 22, 10:18 am, wrote:



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 -




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
VBA cell to textbox [email protected] Excel Discussion (Misc queries) 3 October 22nd 07 07:47 PM
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys Minitman[_4_] Excel Programming 0 February 22nd 05 08:50 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:47 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:43 PM
get cell value to textbox Christy[_3_] Excel Programming 2 August 30th 03 04:15 PM


All times are GMT +1. The time now is 11:35 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"