Solved

A Loop for a Type

Posted on 2003-12-05
3
269 Views
Last Modified: 2010-04-17
Hi,

is this possible to use a Loop to assign values to each field of a Type

ex.:
Type tScreen
     Height as String
     Width as String
     Price as Double
     Color as String
end Type

...something like...

For each "Field" of the Type
    This field = This value
next "Field"

Thanks for all.
0
Comment
Question by:PapaOne
3 Comments
 
LVL 15

Expert Comment

by:SRigney
ID: 9883084
Not sure the language.

In vb you can use
Dim ctl As Control
For Each ctl in Controls
   Select Case TypeName(ctl)
      Case "TextBox":
         ctl.Text = textvalue
      Case "ComboBox":
         ctl.ListItem = listitemindex
   End Select
Next
0
 
LVL 10

Accepted Solution

by:
D_M_D earned 50 total points
ID: 9883202
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question