Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Status bar on a UserForm?

Is it possible to display a status bar control at the bottom of
UserForm to display status alerts or whatever??

Basically, my form contains about 6 text labels. If the
mouse is moved over any text label, I want to display info
about that label in the status bar. I want the status bar to
be placed at the bottom of the userform, so it kind of looks
like a status bar of a typical Windows app.

I'd appreciate any ideas. Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Status bar on a UserForm?

Robert Crandal used his keyboard to write :
Is it possible to display a status bar control at the bottom of UserForm to
display status alerts or whatever??

Basically, my form contains about 6 text labels. If the
mouse is moved over any text label, I want to display info
about that label in the status bar. I want the status bar to
be placed at the bottom of the userform, so it kind of looks
like a status bar of a typical Windows app.

I'd appreciate any ideas. Thanks


Hi Robert,
The StatusBar control is not part of the MSO standard controls and so
using it will require redistribution with your project on systems
running Vista or later. The control will require to be registered on
each machine where it doesn't exist.

Alternatively, you can use a label (or series of labels) to emulate a
statusbar across the bottom of your userform. You can play with the 3d
effects to get it looking exactly like a real statusbar. You can even
emulate panels by using multiple labels inside a container (ie: Frame
with no caption/border, etched SpecialEffect).

While a StatusBar control can be auto-locked to a form's edge (bottom
by default), you can set the position of the fram in the
Userform_Initialize event so it fits the entire width, and top is at
its height minus the userform's height. A bit more work but worth doing
if you make a template that's reusable, then just modify it for each
form built with the template.

If you code the positioning/sizing correctly, the frame should autofit
any userform size. If you use it on a resizeable form (requires code to
achieve) then you need to put code in its Resize event. Here's what I
use for my projects...

Private Sub UserForm_Initialize()
With Me.fraStatusBar
.Top = Me.Height - .Height * 2
.Left = Me.Left: .Width = Me.Width
.Height = 18 '//adjust to suit
End With
With Me.lblStatusBar1
.Top = 0 '//set to top of container
.Left = Me.fraStatusBar.Left + 2
.Width = Me.fraStatusBar.Width - 2
.Height = Me.fraStatusBar.Height - 2
.Caption = "Ready"
End With
End Sub

...to serve as the base. Additional labels inside the frame will just
require incrementing their number ID. Obviously, you'll need to manage
widths/lefts appropriately so there's no overlapping. Adding borders as
separators is a nice touch. Narrow labels works good for this as well.

You can play with the SpecialEffect property of the frame/label[s] to
make it look/feel like a real statusbar.

HTH

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Status bar on a UserForm?

Note that I manually set the Caption, BorderStyle, and SpecialEffect
properties at design time so as to minimize code.<g

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Status bar on a UserForm?

"GS" wrote

Note that I manually set the Caption, BorderStyle, and SpecialEffect
properties at design time so as to minimize code.<g


Thanks Gary. I haven't had time to test your suggestions, but I
was actually thinking about emulating my own status bar with
label controls. I will get around to testing your suggestions soon.

Thanks again!


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Status bar on a UserForm?

Robert Crandal explained :
"GS" wrote
Note that I manually set the Caption, BorderStyle, and
SpecialEffect properties at design time so as to minimize code.<g


Thanks Gary. I haven't had time to test your suggestions, but I
was actually thinking about emulating my own status bar with
label controls. I will get around to testing your suggestions soon.

Thanks again!


Best wishes...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
reuest formula for auto update status & status date PERANISH Excel Worksheet Functions 5 June 2nd 08 04:26 PM
display status bar value in excel userform? Al B Excel Discussion (Misc queries) 0 November 15th 06 01:21 PM
Userform Status Noah Excel Programming 1 January 9th 06 02:47 PM
Need a msg box that displays time status or loading status havocdragon Excel Programming 2 April 2nd 05 05:29 PM
How to use the Status Bar in a UserForm Jeff Marshall Excel Programming 1 October 12th 03 02:44 PM


All times are GMT +1. The time now is 04:09 AM.

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

About Us

"It's about Microsoft Excel"