Asigning a variable to the Name of a Label in a UserForm

C

Chris Gorham

Hi,

I've developed a simple "slidey bar" made up of a series of coloured Labels
in a UserForm. The "slidey bar" shows the progress of some VBA code as it
performs an operation on a workbook.

Each element of the "slidey bar" is called Bar1, Bar2 etc and each is made
visible as the code progresses. From the point of view of neatness it would
be better to have something like "Bar" & var.visible = true and increment var
after each operation. However at the moment I have Bar 1, Bar2 through to
Bar30.visible = true which looks awful especially when I set each one of them
to invisible at the beginning of the code.

Suggestions...Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top