A
adam_kroger
BRIEF EXPLANATION:
I have 6 TextBoxes named LIS1, LIS2, LIS3, ... LIS6. I want to be
able to reference them using a For/Next loop and either read ot write
to them. In VBA I would use something like this:
for i = 1 to 6
me.controls("LIS" & i).Value = ""
next i
Nedless to say, the Controls("LIS" & i).text doesn't work...
What do I need to do differently?
ALSO, in VBA if I wanted an expression to be resolved before being
addressed by the rest of the line I could enclose it in [ ] or use
evaluate(). Is there something similar in VBasic, or is this limited
to script based languages?
I am trying to turn processes I have written in Excel using VBA and
UserForms into stand-alone programs. I am using VisualBasic 2005
Express Edition.
---
MORE DETAILED EXPLANATION ON PROJECT:
The program determines the gaps between dates and gives the results in
months. The interface has 22 Masked TextBoxes (forcing Date entries)
in groupings of 6,5,5,2,2 and 2 singles, also 31 Labels (for reporting
results) in groups of 5 + 1 for the total; using naming conventions as
specified above. I need to be able to cycle through them to either
read the data into array variables for manipulations and comparisons,
or to "reset" them to blank. I could probably get by on this project
with naming them absolutely, but in my next project, it won't be
anywhere near as straightforward.
I have 6 TextBoxes named LIS1, LIS2, LIS3, ... LIS6. I want to be
able to reference them using a For/Next loop and either read ot write
to them. In VBA I would use something like this:
for i = 1 to 6
me.controls("LIS" & i).Value = ""
next i
Nedless to say, the Controls("LIS" & i).text doesn't work...
What do I need to do differently?
ALSO, in VBA if I wanted an expression to be resolved before being
addressed by the rest of the line I could enclose it in [ ] or use
evaluate(). Is there something similar in VBasic, or is this limited
to script based languages?
I am trying to turn processes I have written in Excel using VBA and
UserForms into stand-alone programs. I am using VisualBasic 2005
Express Edition.
---
MORE DETAILED EXPLANATION ON PROJECT:
The program determines the gaps between dates and gives the results in
months. The interface has 22 Masked TextBoxes (forcing Date entries)
in groupings of 6,5,5,2,2 and 2 singles, also 31 Labels (for reporting
results) in groups of 5 + 1 for the total; using naming conventions as
specified above. I need to be able to cycle through them to either
read the data into array variables for manipulations and comparisons,
or to "reset" them to blank. I could probably get by on this project
with naming them absolutely, but in my next project, it won't be
anywhere near as straightforward.