Print Page | Close Window

Can't Add StatusBar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8123
Printed Date: 06 November 2025 at 2:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Can't Add StatusBar
Posted By: corpcon
Subject: Can't Add StatusBar
Date Posted: 21 September 2007 at 9:28pm
Clearly I've missed something.
- I'm using VB6
 
My MDI form has a CommandBars control.
I add the following code ...
 
    Dim StatusBar As IStatusBar
    Set StatusBar = CommandBars.StatusBar
    StatusBar.Visible = True
 
However, IStatusBar is not available in the syntax popup when I enter the code. When I run it, it fails on the second line (Type mismatch).
 
Instead of As IStatusBar, I then tried As StatusBar which is available in the syntax popup. But I still get the same error on the second line (Set StatusBar =...).
 
I see other people are able to make this work, so what silly thing did I miss?



Replies:
Posted By: Bernie
Date Posted: 22 September 2007 at 3:15am
Sytax Error in your codes.
 
      Dim ST As StatusBarPane
      Set ST = CommandBars1.StatusBar.AddPane(12)
      ST.Text = Now
      ST.Width = 500
      CommandBars1.StatusBar.Visible = True
 
These codes did work!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net