Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Keeping a workbook hidden when opened via VBA???


Hi all,

Does anyone know how to keep a workbook hidden that is opened via VB
and visible when opened normally i.e with a double left click or fro
choosing File and then Open??


Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=26681

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Keeping a workbook hidden when opened via VBA???

Have a look the Caller property in help. If the Caller
is "An Auto_Open, Auto_Close, Auto_Activate, or
Auto_Deactivate macro" you could make the
activewindow.visible property false.
Geof.
-----Original Message-----

Hi all,

Does anyone know how to keep a workbook hidden that is

opened via VBA
and visible when opened normally i.e with a double left

click or from
choosing File and then Open??


Simon


--
Simon Lloyd
----------------------------------------------------------

--------------
Simon Lloyd's Profile:

http://www.excelforum.com/member.php?
action=getinfo&userid=6708
View this thread:

http://www.excelforum.com/showthread...hreadid=266818

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Keeping a workbook hidden when opened via VBA???

In the VBA that opens the workbook, simply hide it with:
---------------------------------------------------------
ActiveWindow.Visible = False
or
Windows("WorkbookName.xls").Visible = False
---------------------------------------------------------

Then, in the now hidden workbook's close code, do this:
-------------------------------------------------------------
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Windows("WorkbookName.xls").Visible = True
End Sub
-------------------------------------------------------------

Good Luck
CB Hamlyn

"Simon Lloyd" wrote in message
...

Hi all,

Does anyone know how to keep a workbook hidden that is opened via VBA
and visible when opened normally i.e with a double left click or from
choosing File and then Open??


Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile:
http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=266818



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Keeping a workbook hidden when opened via VBA???

If you open it in VBA, then hide it with the same code. If you don't save
it, then it should be visible next time it is opened.



--
Regards,
Tom Ogilvy

"Simon Lloyd" wrote in message
...

Hi all,

Does anyone know how to keep a workbook hidden that is opened via VBA
and visible when opened normally i.e with a double left click or from
choosing File and then Open??


Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile:

http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=266818



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
Opening a workbook if not opened, going to it if already opened neotokyo[_3_] Excel Programming 0 September 24th 04 08:56 PM
Opening a workbook if not opened, going to it if already opened neotokyo[_2_] Excel Programming 1 September 24th 04 07:17 PM
Opening a workbook if not opened, going to it if already opened neotokyo Excel Programming 1 September 24th 04 06:33 PM
How to see if the opened workbook is opened by another user ? balexis Excel Programming 1 August 18th 04 04:11 PM
keeping rows hidden in outline Tim McPhillips Excel Programming 0 September 2nd 03 05:22 PM


All times are GMT +1. The time now is 12:41 PM.

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"