PDA

View Full Version : [SOLVED] Excel splash screen not working while macro runs



MattehWoo
08-11-2016, 03:42 AM
Hi all,

I've decided to put in a simple splash screen while a macro runs, for obvious reasons.

Here is my code:

Sub Main()
Running.Show
Call CreateData
Call ArrangeData
Call UsageCode
Call Graph
Call ResizeCharts
Unload Running
End Sub

Now the screen does show, but it doesn't seem to start calling my other subs. It only calls them if i close my slash screen.

Where am i going wrong?

Cheers all.

Paul_Hossler
08-11-2016, 06:37 AM
Try



Running.Show (vbModeless)

MattehWoo
08-11-2016, 07:30 AM
Ah now we are getting somewhere.

Now it shows, runs the macros and then clears when it's all done. (perfect!)

However...

It only shows a blank splash screen.... :/

Paul_Hossler
08-11-2016, 08:45 AM
Option Explicit

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Sub Main()
Running.Show vbModeless
DoEvents
Call CreateData
Call ArrangeData
Call UsageCode
Call Graph
Call ResizeCharts
Unload Running
Application.StatusBar = False

End Sub

Sub CreateData()
Sleep 2000
Application.StatusBar = "CreateData"
End Sub
Sub ArrangeData()
Sleep 2000
Application.StatusBar = "ArrangeData"
End Sub
Sub UsageCode()
Sleep 2000
Application.StatusBar = "UsageCode"
End Sub
Sub Graph()
Sleep 2000
Application.StatusBar = "Graph"
End Sub
Sub ResizeCharts()
Sleep 2000
Application.StatusBar = "ResizeCharts"
End Sub

MattehWoo
08-15-2016, 12:25 AM
Cheers Paul!