excel hide and visible problem

  • Thread starter Thread starter Pierre via OfficeKB.com
  • Start date Start date
P

Pierre via OfficeKB.com

Hi experts,

my application hides excel completely and is run through a userform.

if an error occurs, my userform is shut down and excel is not visible anymore.

I'am looking foor a piece of code that i can give the user.

the user should then be able to double klick this piece of code on his
desktop to show the hidden instance of excel again.

does anybody have this piece of code?
Thanks,
Pierre
 
Sub ExcelVisible()
Dim oXL As Object

On Error Resume Next
Set oXL = GetObject(, "Excel.Application")
If Not oXL Is Nothing Then
oXL.Visible = True
Set oXL = Nothing
End If
On Error GoTo 0
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top