Progress Bar Issues

trsisko

Board Regular
Joined
May 20, 2008
Messages
176
I'm using for following. It works great apart from Today, it seems to rerun an old progress bar from where I had issues. It's almost like it doesn't full clear and reload when required. anyone have any ideas?

Code:
Function TotalQuestions() As Integer
    TotalQuestions = Application.CountA(shQuestions.Columns(6))
End Function

Code:
    'Load Controls with Data
    Me.Label2.Width = 361.1 * (m_QID / m_TotalUniqueQuestions)
    Me.Label2.Caption = Format((m_QID / m_TotalUniqueQuestions), "0.0%")
    Me.lblQID.Caption = m_QID
    Me.lblQuestion.Caption = m_Question
    Me.LblDesc.Caption = strQInfo(2)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,365
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Those 2 pieces of code don't appear to relate to each other and, although I can roughly guess what the second is supposed to do, I don't know how you're calling it or have any idea in what way it is flawed. Can we have a hint or two? ;)
 
Upvote 0

trsisko

Board Regular
Joined
May 20, 2008
Messages
176
Prior to this code running the Progress Bar doesn't always redraw. Anyone have any ideas how I can get the control to refresh prior to reload?

Code:
    Me.Label2.Width = 361.1 * (m_QID / m_TotalUniqueQuestions)
    Me.Label2.Caption = Format((m_QID / m_TotalUniqueQuestions), "0.0%")
    Me.lblQID.Caption = m_QID
    Me.lblQuestion.Caption = m_Question
    Me.LblDesc.Caption = strQInfo(2)
 
Upvote 0

trsisko

Board Regular
Joined
May 20, 2008
Messages
176
I have tried the above code with no success. Would it not work as well if I somehow cleared the Array on Exit?


Code:
Dim m_TotalUniqueQuestions As Integer

Code:
    Dim n As Long
For n = 1 To 10
Label2.Visible = Not Label2.Visible
DoEvents
    Me.Repaint
    Me.Label2.Width = 361.1 * (m_QID / m_TotalUniqueQuestions)
    Me.Label2.Caption = Format((m_QID / m_TotalUniqueQuestions), "0.0%")
    Me.lblQID.Caption = m_QID
    Me.lblQuestion.Caption = m_Question
    Me.LblDesc.Caption = strQInfo(2)
Next n
 
Upvote 0

Forum statistics

Threads
1,190,817
Messages
5,983,059
Members
439,818
Latest member
schizoid231

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top