I want to place 100 different values for 100 different labels on a form. I can do it simply with the following loop, but VBA won't accept any syntax I have tried for the label name. For CT = 1 to 100 [Forms]![F3-subject index]!["sn"&CT].Caption=valuearray(CT) next CT
How can this loop be accomlished?
Comments:
Sep 12, 2008
- The solution didn't seem to address my problem
Sep 12, 2008
- This solution relates to excel. I am working with labels on an access form. Can my loop be performed in VBA or DAO for access? If so, what is the syntax?
Sep 12, 2008
- I already spent a day searching various forums and links such as the one you suggest. They do not address the particular question: "Can a variable be used in VBA to designate the label name on a form? If so, what is the syntax? IF not, can it be done in DAO? If so, what is the syntax?
Sep 12, 2008
- Coolguy008 suggests: Dim lbl as label lbl.Caption = "string" [Forms]![F3-subject index]![sn5] = label But, "sn5" in your solution is not a variable. I want to use a variable in the place of [sn5]. If this is a solution, you'll have to explain it to me.
Sep 12, 2008
- Yes, Suben, that is exactly what I did. But, that syntax doesn't work.
I need to purchase a software programme that will enable me to scan or draw plans of buildings and...
(More)
I need to purchase a software programme that will enable me to scan or draw plans of buildings and edit them.
It has to be very simple!
i have a word file with flow chart which is made by visio software does not open in another...
(More)
i have a word file with flow chart which is made by visio software does not open in another computer.
Add the things you own to your My Products collection and get product information, solutions to problems, manuals & guides, tips and how-to's, reviews & ratings and local repair service - all in one easy place.