unable to display picture in userform while other codes are running.

countryfan_nt

Well-known Member
Joined
May 19, 2004
Messages
765
Hello friends, I need your help please. I am going crazy, I tried to fix my challenge over and over again, still stuck.

The problem: I am trying to shows a picture that is placed in the userform. The userform will stay posted while a number of other codes are running.
The problem is the userform borders are showing while the other codes are running but the actual placed picture is not.
So to make it short: I want the code to run ‘play’ and show the picture, while the other codes are running.

Please note:
a. The code that places the picture is called ‘play’. It works smoothly and displays the picture when ran alone.
b. All the codes are running smoothly on a stand alone basis.

Here are the codes, and thank you so very much!

Code:
Sub play()
    waiting.Show vbModeless
End Sub

Public Sub Unplay()
    Unload waiting
End Sub


Private Sub Image1_Click()

ReportForm.Hide

Call play
Application.ScreenUpdating = False
  
    Sheets("PTSum").PivotTables("PTRec").RefreshTable
    Sheets("PTSum").PivotTables("PTSpecCo").RefreshTable
    Sheets("PTSum").PivotTables("PTProjWise").RefreshTable
    Sheets("PTSum").PivotTables("PTMonWise").RefreshTable

If OBSpeCo = True Then
If ComboCo.Value = "" Or ComboProject.Value = "" Or ComboMonth.Value = "" Or ComboCatg.Value = "" Or ComboCo.Value = "----------------------------------- Select Company Name ---------------------------" Then

 'MsgBox "One of the following boxes is missing: Please fill all the cells: E9 E10 and E11"
MsgBox "Select all boxes before View Report", vbInformation, "Please fill all the boxes"

Exit Sub
Else

Call Fill10

Call Fill11

Call Fill12

Call Fill13

'Call Rpt1

Call c2RptCo

'Call HideBRows

End If
End If

If OBAccm = True Then

If ComboProject.Value = "" Or ComboMonth.Value = "" Or ComboCatg.Value = "" Then
 
 'MsgBox "One of the following boxes is missing: Please fill all the cells: E9 E10 and E11"
MsgBox "Select all boxes before View Report", vbInformation, "Please fill all the boxes"

Exit Sub
Else

Call Fill1

Call Fill2

Call Fill3

'Call Rpt1
''DoEvents

Call c2Rpt

Call HideBRows

End If
End If

If OBMonW = True Then

If ComboProject.Value = "" Then
 
 'MsgBox "One of the following boxes is missing: Please fill all the cells: E9 E10 and E11"
MsgBox "Select Project to View Report", vbInformation, "Please fill all the boxes"

Exit Sub
Else

Call Fill4

Call c2RptMonW

Call ColorRows

End If
End If
 '  ===== Motnhly with Comparatives - Aging ====
If OBMonWComp = True Then

Worksheets("Report -All Catg MonthWiseWComp").Visible = True
If ComboProject.Value = "" Then
 
 'MsgBox "One of the following boxes is missing: Please fill all the cells: E9 E10 and E11"
MsgBox "Select Project to View Report", vbInformation, "Please fill all the boxes"

Exit Sub
Else

Call SumIfFComp

Call ColorRowsMonComp

Call GroupComp

End If
End If

If OBProjW = True Then

If ComboMonth.Value = "" Then
 
 'MsgBox "One of the following boxes is missing: Please fill all the cells: E9 E10 and E11"
MsgBox "Select Month to View Report", vbInformation, "Please fill all the boxes"

Exit Sub
Else

Call Fill5

Call c2RptProjW

Call ColorRowsProj

End If
End If
If OBColRpt = True Then

If ComboCo.Value = "" Or ComboCatg.Value = "" Or ComboCo.Value = "----------------------------------- Select Company Name ---------------------------" Then

 'MsgBox "One of the following boxes is missing: Please fill all the cells: E9 E10 and E11"
MsgBox "Select all boxes before View Report", vbInformation, "Please fill all the boxes"

Exit Sub
Else

Call Filco1P
Call c2ColcRptP

'Call ColcRpt

'DoEvents

Call DeleteRows
'DoEvents

Call HideColRows
'DoEvents

Call FBrdCol
'DoEvents

End If
End If
'End Sub

If OBClmColRpt = True Then

If ComboCo.Value = "" Or ComboCatg.Value = "" Or ComboCo.Value = "----------------------------------- Select Company Name ---------------------------" Then

 'MsgBox "One of the following boxes is missing: Please fill all the cells: E9 E10 and E11"
MsgBox "Select all boxes before View Report", vbInformation, "Please fill all the boxes"

Exit Sub
Else

Call FilClmP
Call c2ClmColRptP
Call ClmColcRpt
'DoEvents

Call DeleteClmColRows
'DoEvents

Call SortData
'DoEvents

Call DeleteDups
'DoEvents

Call SumIfF
'DoEvents

'Call HideColRowsClm
'DoEvents

Call FBrd
'DoEvents

Call ConFormat
'DoEvents

End If
End If

Call Unplay

Application.ScreenUpdating = True

End Sub
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,223,518
Messages
6,172,797
Members
452,481
Latest member
Najwan

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
Back
Top