Below is the code I am working on - I want to return the value from the Function so thaat I know if the program is already running, however it has been a long time sence I've used a Function and cannot remember how to get it to pass the responce back.
Will one of you point out my error please - Thanks!
Sub Main()
Program_Is_Already_Running (Run)
If Run = False Then
frmSplash.Show
frmSplash.Refresh
OpenData
Set fMainForm = New frmMain
Load fMainForm
Unload frmSplash
fMainForm.Show
Elseif Run = "True" then
response = msgbox("Program Already Running", vbOKOnly, "Startup Error"
End
End If
End Sub
Function Program_Is_Already_Running(R1 As String)
R1 = App.PrevInstance
End Function
"The beauty of the second amendment is, that it will not be needed until they try to take it." - Thomas Jefferson
WebMaster:
Will one of you point out my error please - Thanks!
Sub Main()
Program_Is_Already_Running (Run)
If Run = False Then
frmSplash.Show
frmSplash.Refresh
OpenData
Set fMainForm = New frmMain
Load fMainForm
Unload frmSplash
fMainForm.Show
Elseif Run = "True" then
response = msgbox("Program Already Running", vbOKOnly, "Startup Error"
End
End If
End Sub
Function Program_Is_Already_Running(R1 As String)
R1 = App.PrevInstance
End Function
"The beauty of the second amendment is, that it will not be needed until they try to take it." - Thomas Jefferson
WebMaster: