Re: Making application invisible!!
Moved to Office Development.
Re: Making application invisible!!
Just watch that type of thing. If a user closes any Dialog box with the 'X' button by mistake, the application will still be running in the background. The only way of closing it down is using the task manager.
Don't know the code, but you could try minimising it .
Re: Making application invisible!!
Quote:
Originally Posted by ModusOperandi
Just watch that type of thing. If a user closes any Dialog box with the 'X' button by mistake, the application will still be running in the background. The only way of closing it down is using the task manager.
Don't know the code, but you could try minimising it .
Try this:
Code:
Private Sub UserForm_Terminate()
Application.Visible = True
ThisWorkbook.Saved = True
Application.Quit
End Sub
Not sure how to eliminate the "Flicker" you see when Excel first opens... I have the same issue.
Matt
Re: Making application invisible!!
I use this code to prevent users from closing the forms with the x button.
Code:
Private Sub userform_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "Please use the Exit button!"
End If
End Sub
This forces the user to close the form using the appropriate button to save and safely close the application.
Still no luck solving the startup flicker but if i ever figure a way around it I'll let you know Matt.
Re: Making Excel invisible!!
Heres a solution for future reference. It is not possible directly, however you can use automation. In that case an instance of excel starts hidden. The most straightforward is scripting. Just create a text file with:
Code:
Dim objXL
Set objXL = WScript.CreateObject("Excel.Application")
objXL.WorkBooks.Open "FullPath\FileName.xls"
and change file extension to ‘vbs’. Excel starts after double-clicking the script file, the drawback of this method is hardcoded excel file path.