Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Hide "Excel" when running VB

Is there a way to hide "Excel" when its VB code is running? Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 983
Default 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   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 661
Default 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   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 108
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"Running Virus Scan" ....On Opening Excel Workbook Dermot Excel Discussion (Misc queries) 1 August 30th 07 09:17 PM
Sheets("Rpt").Copy different results from running in macro than off excel menu?? tmbo Excel Discussion (Misc queries) 7 August 9th 06 01:13 PM
Excel 2003 - "interesting" feature when running macros BEDE[_4_] Excel Programming 1 September 16th 04 09:57 AM
"Programmatic Access to be Denied" displays when running macro on excel in XP Stephen Fong Excel Programming 3 October 21st 03 09:19 AM


All times are GMT +1. The time now is 06:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"