In visual basic I could create and object arrary for the form objects and my code would look like this.
for i = 1 to 10
frmResults.ProgressBar(i).Max = frmResults.txtRedLine.Text
next i
In VBA it looks like this.
'Set Progressbars RedLine (Max)
frmResults.ProgressBar1.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar2.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar3.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar4.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar5.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar6.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar7.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar8.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar9.Max = frmResults.txtRedLine.Text
frmResults.ProgressBar10.Max = frmResults.txtRedLine.Text
'End Set Progressbars RedLine (Max)
Is there anyway to make the VBA code more like the Visual basic code? I have not been able to find any information on creating object arrays on the userform.
Bookmarks