Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Searching through all the controls for a certain image box

Posted on 2000-03-14
1
Medium Priority
?
144 Views
Last Modified: 2010-05-02
I have a form with various control arrays on it. On another form, a string variable contains the contents of the tag property of the control to be found. How do I look through every control on this other form until the one matching the variable is found, and then change the properties of this control?
0
Comment
Question by:mi5
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 120 total points
ID: 2615678
DIM strTagValue as STRING

DIM objControl as Control
FOR EACH objControl in FORM.Controls
  if objControl.Tag = strTagValue then
    ... do processing here
  end if
NEXT

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

916 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