Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Opening another file in background

I have an Auto_Open macro in which I want to have
O:\PT_DRIVER_SCHED\Templates\EmployeeList.xls open in the background
without losing focus on the current workbook.








  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Opening another file in background

Sub test()
Dim wb As Workbook, wn As Window
Dim sFile As String
sFile = "path_and_filename.xls"
Application.ScreenUpdating = False
On Error Resume Next
Set wb = Workbooks.Open(sFile)
If Not wb Is Nothing Then
For Each wn In wb.Windows
wn.Visible = False
Next
End If
On Error GoTo 0
Application.ScreenUpdating = True
End Sub

Perhaps it would be better if you save your file as 'hidden' in the first
place

Regards,
Peter T

"Patrick Simonds" wrote in message
...
I have an Auto_Open macro in which I want to have
O:\PT_DRIVER_SCHED\Templates\EmployeeList.xls open in the background
without losing focus on the current workbook.




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
Hidden Background Data File PSM[_16_] Excel Worksheet Functions 1 June 15th 09 09:19 PM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM
How to open file in the background. It is possible? Andrzej Excel Programming 1 June 1st 05 01:35 AM
How to open file in the background. It is possible? Andrzej New Users to Excel 1 May 31st 05 10:46 PM
Opening a Workbook in the Background g-boy Excel Programming 6 May 20th 05 04:26 PM


All times are GMT +1. The time now is 10:21 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"