Hi Guys,
Was just wondering if anyone could see or tell me why this code would be causing MC to close instantly when it is compiled:
Public g_MC As MediaJukebox.MJAutomation
Public Sub Main()
On Error GoTo anError
' First try to get an already running object
Set g_MC = GetObject(, "MediaJukebox Application")
anError:
If Err.Number = 429 Then
'Then, create a new object
Set g_MC = CreateObject("MediaJukebox Application")
End If
MsgBox Command$
End Sub
As soon as I call the program it kills MC instantly and as you can see it's v. basic. Was just wondering if I'm doing something wrong or if I have to close or drop the MC object or anything before the program ends?
Any help appreciated, thanks!