+ Reply to Thread
Results 1 to 5 of 5

status bar not showing the message

Hybrid View

  1. #1
    Registered User
    Join Date
    04-26-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2003 2007
    Posts
    69

    status bar not showing the message

    I have this code,

    
    Private Sub Add_Quotes()
    
        Dim StkQ As Long
          On Error Resume Next
          StkQ = Worksheets(2).Range("T1").Value
          Worksheets(2).Range("T1").Value = Worksheets(2).Range("U1").Value
          
        With Application
        .CutCopyMode = False
        .ScreenUpdating = True
        .Calculation = xlCalculationAutomatic
        .DisplayStatusBar = True
        .StatusBar = "* " & StkQ & " *"
        .EnableEvents = True
        End With
    
    End Sub
    the result on the statusbar is * 0 *, where is wrong with my code

    thanks

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: status bar not showing the message

    What's the value of cell T1 in sheets(2) ?
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: status bar not showing the message

    You have defined StkQ as a long variable.
    I guess cell T1 is not a number but rather a string or is empty. That's why you get 0.

  4. #4
    Registered User
    Join Date
    04-26-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2003 2007
    Posts
    69

    Re: status bar not showing the message

    T1 has some value, some Quotes,
    Last edited by bezbid; 02-03-2015 at 01:05 AM.

  5. #5
    Registered User
    Join Date
    04-26-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2003 2007
    Posts
    69

    Re: status bar not showing the message

    Oh i see, change the Long to String, now is ok,

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA Status Bar Message
    By hobbiton73 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-20-2014, 08:16 AM
  2. Showing calculation and iteration times in status bar at the bottom
    By mrvp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2013, 09:40 AM
  3. Showing splash screen with status bar with Background loading of another form
    By kumar1248 in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 04-26-2012, 12:18 AM
  4. Replies: 1
    Last Post: 06-01-2006, 01:15 PM
  5. Replies: 3
    Last Post: 05-05-2005, 06:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1