Textbox rowsource

ganesh_05

New Member
Joined
Aug 11, 2005
Messages
43
Hi friends...

I have been facing a problem with textbox rowsource method....

is the following syntax a correct one??

textbox1.rowsource = "Demand!A3:Y100"

Demand is sheet name...

do i need to change any of text box properties ??

When i m running the form... i m facing the following error ...

"Couldnot set the rowsource property. Member not found."

Any help.. ??

Thanks in advance...
Ganesh.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
You normally assign data to a TextBox by;

TextBox1.Text = Sheets("Demand").Range("A1").Value

or

TextBox1.Text = Sheets("Demand").Cells(1,1).Value

If you want to display data from more than 1 cell on the spreadsheet in the same textbox at the same time, you need to add the data together first, you can't assign from several cells at the same time.

eg:

Dim myText as variant

For i = 1 to 10
myText = myText & Sheets(1).Cells(i,1) & vbCr
Next i

TextBox1.Text = myText
 
Upvote 0
RowSource is not a property of a textbox.
 
Upvote 0
Thank you very much for your replies...

but when i checked the help from excel... it says abt text box as...

"A TextBox is the control most commonly used to display information entered by a user. Also, it can display a set of data, such as a table, query, worksheet, or a calculation result. If a TextBox is bound to a data source, then changing the contents of the TextBox also changes the value of the bound data source."

I want to populate a table in the textbox and the table is from a worksheet ... so i want to bound the textbox to a data source (here it is DEMAND sheet)... my user can edit the table thats y i m not using listbox here...

is it not possible??

and when i was writing the code... it is populating rowsource property/method when i write textbox... then how come rowsource doesn't apply to textbox??
 
Upvote 0
Ok now i understand that rowsource is not a textbox's property...

can u please suggest me a way to bound the textbox to a data source... i want the textbox to display a table...
 
Upvote 0
VBA help for "rowsrouce property":

Specifies the source providing a list for a ComboBox or ListBox.

No mention of textboxes there.

Fat Cat has a solution for you.
 
Upvote 0
You could display a table if you use a multicolumn ListBox.

If your data is in consecutive columns, just use the RowSource property to fill it with the data.

Otherwise you need to create an array and fill that with the data you want, then assign the array to the ListBox.
 
Upvote 0
I want to allow the user to edit the data...

But the user can't edit the data if i provide the data with a listbox...

thats y i m using a textbox...
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,378
Members
448,955
Latest member
BatCoder

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top