looping through activex textbox to change value

tp2468

New Member
Joined
Mar 5, 2009
Messages
45
Hi All,

I know this topic has been posted many times before but even after extensive searching, I still can't something that works for me. I want to change the value of multiple activex textboxs. The data is stored in an array variable.
Code:
For i = 1 To 12
textnum(i) = Application.WorksheetFunction.Match(i, numrange, 0)
output(i) = Application.WorksheetFunction.Index(outputrange, textnum(i), 1)
Me.controls("Textbox" & i).Value = "" ' this line doesnt work
Next i

Will this method work? The loop works fine however Me.controls("Textbox" & i).Value does not work. What line of code will write to the textbox object from an array?

Many Thanks

Tom
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Where are the textboxes located?
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,554
Members
448,970
Latest member
kennimack

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