Home All Groups Group Topic Archive Search About

Automating Excel - Is Visible the Default?

Author
27 Nov 2006 7:09 PM
Elliot
After executing the following line:

WB = XL.Workbooks.Open("c:\test.xls")

Excel is visible using vb.net 2005.  Is this a change from previous
versions of VB?  I know I can use xl.visible=false after this line but
it is a nuisance to have excel pop up even for a second when I don't
use its interface.

Thank you,

Elliot Semmelman

Author
28 Nov 2006 12:04 AM
RobinS
Why not set it to visible before opening the workbook?
Aren't you opening Excel before this? Can't you set
[Visible] = false after that and before this?

Robin S.
-------------------

Show quoteHide quote
"Elliot" <esemmel***@afgweb.com> wrote in message
news:1164654544.463863.262940@f16g2000cwb.googlegroups.com...
> After executing the following line:
>
> WB = XL.Workbooks.Open("c:\test.xls")
>
> Excel is visible using vb.net 2005.  Is this a change from previous
> versions of VB?  I know I can use xl.visible=false after this line but
> it is a nuisance to have excel pop up even for a second when I don't
> use its interface.
>
> Thank you,
>
> Elliot Semmelman
>
Author
28 Nov 2006 9:03 PM
Paul Clement
On 27 Nov 2006 11:09:04 -0800, "Elliot" <esemmel***@afgweb.com> wrote:

¤ After executing the following line:
¤
¤ WB = XL.Workbooks.Open("c:\test.xls")
¤
¤ Excel is visible using vb.net 2005.  Is this a change from previous
¤ versions of VB?  I know I can use xl.visible=false after this line but
¤ it is a nuisance to have excel pop up even for a second when I don't
¤ use its interface.

The default behavior is that Excel is not visible.

Could there be some auto macro code in the Workbook that is causing the UI to become visible?


Paul
~~~~
Microsoft MVP (Visual Basic)