Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can any controls name concatenated?
If you know the names and the number of textboxes:
Option Explicit Private Sub UserForm_Initialize() Dim iCtr As Long For iCtr = 1 To 10 Me.Controls("Txtbox" & iCtr).Value = "all the same" Next iCtr End Sub Richard wrote: Hi, Hope someone can help me with this. Here is the Example that I'm trying to do. Example assume there is the text box controls such as txtbox1, txtbox2, txtbox3, txtbox4, txtbox5, etc... Private Sub UserForm_Initialize() Dim ctrTextbox As Controls For i = 1 To 10 ctrTextbox = "txtbox" & i Me.ctrTextbox = "All text box have same value" Next i End Sub With above coding, I'm getting Complie error: "Argument not optional" Any help will be appreciated. Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
concatenated lookup? | Excel Worksheet Functions | |||
appearance of a concatenated value | Excel Worksheet Functions | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
Event procedures for controls added with Controls.Add | Excel Programming | |||
Separate Concatenated First/Last Name | Excel Programming |