AnsweredAssumed Answered

Loop through TextBox on Display page

Question asked by AggiePaul on Feb 8, 2016
Latest reply on Feb 9, 2016 by AggiePaul

I am trying to make a VBA code to loop through about 100 textbox's on a page. I am trying to use a variable to assign the text box name, but am struggling to find a way to do it. Here is the base code I am trying to change. Ideally I would loop through different "X" values to hit all the different Textbox's.

 

Sub UpdateTextValues()

 

Dim srv As Server

Dim X As Integer

Dim TB As String

 

TB = "TB"

X = 1

Set srv = PISDK.Servers.Item("pkg-eva1-picp1")

 

ThisDisplay.TB1.Contents = "Test 1"

   

End Sub

 

I have tried using the "controls" command, but it does not appear to work on a display page. I have gotten it to work on Userforms before...

 

Controls("TB1").Value = "Test 1"      'This give the error "Sub of Function not defined

 

Any help would be greatly appreciated. As I stated before, this is for a display page. Not a userform.

 

-Paul

Outcomes