LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to hide Excel window when activating a Shape object

Since my second posting has been posted for two weeks
without getting an anwser, I hope this re-posting could
get help from somebody. Thanks in advance.

The following is my second posting:

Yes, I tried this but it does not help. My codes look like:

excel_app = CreateObject("Excel.Application")
' or excel_app = new Excel.Application
excel_app.Visible = False ' Actually it defaults to False
workbook = excel_app.Workbooks.Open("myfile.xls")
worksheet = workbook.Worksheets("Sheet1")
shape = worksheet.Shapes.Item(1)
......

It seems that the Excel automation server, when invoked
with "Verb" function call, will always try to set the
Excel app's visibility to True. I am not sure if we have
other ways to tell the server at the invoke time that we
do not want to display the window.

Thanks,
Yi

-----Original Message-----
Have you tried:

Application.Visible = False
....
shape.OLEFormat.Verb(Excel.XlOLEVerb.xlVerbOpen )
....
Application.Visible = True

--
Bob Kilmer


"Yi" wrote in message
...
I have a VB application that processes an Excel file.

The
Excel file has a Chart (actually a Workbook) Shape

object
embedded in it. The application needs to activate the
Shape object in order to update the data in the

worksheet.
When the following code is called, the Excel window will
always popup.
shape.OLEFormat.Verb(Excel.XlOLEVerb.xlVerbOpen)

Can anybody tell me how to hide the Excel window when

this
code is called? I can only find two types of verbs -

Open
and Primary, and they both display the window.

Or, is there any other way to activate the OLE object
without displaying the Excel window?

Thanks in advance.
Yi


 
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
Activating object from Excel cell Amnon Wilensky Excel Worksheet Functions 2 March 29th 09 06:46 PM
Close Excel server after activating OLE object Goofball Excel Discussion (Misc queries) 1 March 13th 08 05:32 PM
Activating a Chart object Hari Prasadh Charts and Charting in Excel 6 August 2nd 05 07:22 PM
How to hide Excel window when activating a Shape object Bob Kilmer Excel Programming 0 September 27th 03 03:51 PM
Hide/Show modeless userform when activating/deactivating workbooks Jeremy Gollehon[_2_] Excel Programming 0 August 28th 03 11:05 PM


All times are GMT +1. The time now is 11:06 AM.

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

About Us

"It's about Microsoft Excel"