HI All,
I have googled a code which shows the status bar on executing code. I need to Place my vba code to show the running progress where i place or call my module. The code and worksheet is attached.
HTML Code:Option Explicit Private Sub UserForm_Activate() Application.Cursor = xlWait ProgressBar.MousePointer = fmMousePointerHourGlass DoEvents Call CalculateData Application.Cursor = xlDefault Unload Me End Sub Private Sub UserForm_Initialize() TextBox2.Left = TextBox1.Left TextBox2.Top = TextBox1.Top + 3 TextBox4.Left = TextBox3.Left TextBox4.Top = TextBox3.Top + 3 TextBox2.Width = 0 TextBox4.Width = 0 End Sub Sub CalculateData() Dim Total1 As Long Dim Total2 As Long Dim x As Long Dim y As Long Dim MyTimer As Double Call ExcelTest Total1 = 20 Total2 = 1000 For x = 1 To Total1 For y = 1 To Total2 MyTimer = Timer ProgressBar.TextBox4.Width = (y / Total2) * 200 ProgressBar.Label2.Caption = "Calculating Data: " & y & " of " & Total2 DoEvents Next y ProgressBar.TextBox2.Width = (x / Total1) * 200 ProgressBar.Label1.Caption = "Updating: " & x & " of " & Total1 Next x End Sub



