Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Hide "Excel" when running VB
Is there a way to hide "Excel" when its VB code is running? Thanks.
|
#2
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
|
|||
|
|||
Hide "Excel" when running VB
application.visible = false
Careful with this though. Make sure you have proper error handling. If your code crashes... Your excel will not come back... HTH "Old Car" wrote: Is there a way to hide "Excel" when its VB code is running? Thanks. |
#3
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Hide "Excel" when running VB
At the start of your code
Application.Visible = False At the end of your code Application.Visible = True -- Regards, Tom Ogilvy "Old Car" wrote in message news:rAuce.73$k01.46@trnddc03... Is there a way to hide "Excel" when its VB code is running? Thanks. |
#4
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
Hide "Excel" when running VB
Do you mean to hide the entire application? If so, use
Application.Visible = False ' your code here Application.Visible = True If you mean to simply hide the interim results of a VBA procedure while it is running, use Application.ScreenUpdating = False ' your code here Application.ScreenUpdating = True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Old Car" wrote in message news:rAuce.73$k01.46@trnddc03... Is there a way to hide "Excel" when its VB code is running? Thanks. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide "Excel" when running VB
....or if you are debugging your app and break out, same thing... You will
need to go into Task Manager (Ctrl+Alt+Del), find the EXCEL.EXE under Processes tab and click <End Process "Jim Thomlinson" wrote: application.visible = false Careful with this though. Make sure you have proper error handling. If your code crashes... Your excel will not come back... HTH "Old Car" wrote: Is there a way to hide "Excel" when its VB code is running? Thanks. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide "Excel" when running VB
True, but at that point you still have the VBE and you can do a simple sub to
bring the Excel back to visible. If your code is protected and you crash then there is no VBE and no way to reset the visible property. Unless Tom or Chip knows one... They always know that kind of stuff... ;-) HTH "Charlie" wrote: ...or if you are debugging your app and break out, same thing... You will need to go into Task Manager (Ctrl+Alt+Del), find the EXCEL.EXE under Processes tab and click <End Process "Jim Thomlinson" wrote: application.visible = false Careful with this though. Make sure you have proper error handling. If your code crashes... Your excel will not come back... HTH "Old Car" wrote: Is there a way to hide "Excel" when its VB code is running? Thanks. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide "Excel" when running VB
Obviously this should never happen, but just in case -
Assuming the hidden instance of Excel is the only running instance it should be possible to make it visible again using a macro in Word: Sub XLvisible() Dim oXL As Object On Error Resume Next Set oXL = GetObject(, "Excel.Application") oXL.Visible = True If oXL Is Nothing Or Err.Number < 0 Then MsgBox "Couldn't get Excel" End If End Sub Or just a simple VBS. Copy following in a text editor and save with a .vbs extension, eg "XLvisible.vbs" On Error Resume Next Set oXL = GetObject(, "Excel.Application") If TypeName(oXL) = "Empty" Then Msgbox "Couldn't get Excel" Else oXL.Visible = True End If If the hidden instance is one of multiple Excel instances it's a lot more complicated. Regards, Peter T "Jim Thomlinson" wrote in message ... True, but at that point you still have the VBE and you can do a simple sub to bring the Excel back to visible. If your code is protected and you crash then there is no VBE and no way to reset the visible property. Unless Tom or Chip knows one... They always know that kind of stuff... ;-) HTH "Charlie" wrote: ...or if you are debugging your app and break out, same thing... You will need to go into Task Manager (Ctrl+Alt+Del), find the EXCEL.EXE under Processes tab and click <End Process "Jim Thomlinson" wrote: application.visible = false Careful with this though. Make sure you have proper error handling. If your code crashes... Your excel will not come back... HTH "Old Car" wrote: Is there a way to hide "Excel" when its VB code is running? Thanks. |
#8
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
|
|||
|
|||
Hide "Excel" when running VB
why dont you just minimize the excel window?
-- hope this helps Paul "Chip Pearson" wrote: Do you mean to hide the entire application? If so, use Application.Visible = False ' your code here Application.Visible = True If you mean to simply hide the interim results of a VBA procedure while it is running, use Application.ScreenUpdating = False ' your code here Application.ScreenUpdating = True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Old Car" wrote in message news:rAuce.73$k01.46@trnddc03... Is there a way to hide "Excel" when its VB code is running? Thanks. |
#9
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
|
|||
|
|||
Hide "Excel" when running VB
Roedd <<paul wedi ysgrifennu:
why dont you just minimize the excel window? There's a difference between <<hiding and <<crouching down really small and hoping that no one spots you ;-) -- Rob http://www.asta51.dsl.pipex.com/webcam/ This message is copyright Robert Bruce and intended for distribution only via NNTP. Dissemination via third party Web forums with the exception of Google Groups and Microsoft Communities is strictly prohibited and may result in legal action. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
"Running Virus Scan" ....On Opening Excel Workbook | Excel Discussion (Misc queries) | |||
Sheets("Rpt").Copy different results from running in macro than off excel menu?? | Excel Discussion (Misc queries) | |||
Excel 2003 - "interesting" feature when running macros | Excel Programming | |||
"Programmatic Access to be Denied" displays when running macro on excel in XP | Excel Programming |