Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Asigning a variable to the Name of a Label in a UserForm

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 301
Default Asigning a variable to the Name of a Label in a UserForm

Try something like
me.Controls("Bar" & var).Visible
Bob Umlas
Excel MVP
"Chris Gorham" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform Label Steve[_9_] Excel Discussion (Misc queries) 7 October 29th 07 09:51 PM
Asigning a value to words Tim Excel Discussion (Misc queries) 10 July 6th 07 05:46 PM
Userform Label question David Goodall Excel Programming 2 October 29th 04 03:33 PM
Userform - Label Caption - How to update from a variable Alan Excel Programming 3 August 2nd 04 04:39 AM
changing selected label on userform w/ a variable mike k Excel Programming 1 February 19th 04 01:48 AM


All times are GMT +1. The time now is 11:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"