Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Ignore the 'file in use message' when opening Excel

Hi all,

I am scheduling an Excel workbook using the Scheduler Tool of Windows.
It just calls an Excel workbook, which opens, does some autorun processing
and closes again.

This works well, except when I have excel already open. In that case another
instance of Excel is opened (by the scheduler) and I get the "File in Use"
popup stateing that my PERSONAL.XLS is locked for editing. And gives me a
chance to cancel (button). A logical thing but unhandy in this context.

Is there a way to ignore this message or to add an extra parameter to the
call of the worksheet to prevent the message, or to automatically apply
cancel?

Thanks!

M.

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Ignore the 'file in use message' when opening Excel

Within Excel I'd use:

Application.DisplayAlerts = False
'code to open the workbook
Application.DisplayAlerts =True

in the scheduler, are you running this as a .vbs file? If so, consider
something like (untested):
Set objExcel = CreateObject("Excel.Application")
objExcel.DisplayAlerts=False
Set objWorkbook = objExcel.Workbooks.Open("C:\path\filename.xls")
objExcel.DisplayAlerts=True
objExcel.Run "MacroName"
objExcel.ActiveWorkbook.Save
objExcel.ActiveWorkbook.Close(0)
objExcel.Quit

If that doesn't help, consider posting your code where you instantiate
Excel, that might help draw more answers.

Keith

"Michiel via OfficeKB.com" wrote:

Hi all,

I am scheduling an Excel workbook using the Scheduler Tool of Windows.
It just calls an Excel workbook, which opens, does some autorun processing
and closes again.

This works well, except when I have excel already open. In that case another
instance of Excel is opened (by the scheduler) and I get the "File in Use"
popup stateing that my PERSONAL.XLS is locked for editing. And gives me a
chance to cancel (button). A logical thing but unhandy in this context.

Is there a way to ignore this message or to add an extra parameter to the
call of the worksheet to prevent the message, or to automatically apply
cancel?

Thanks!

M.

--
Message posted via http://www.officekb.com

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Ignore the 'file in use message' when opening Excel

Hi Keith,

Thanks for your answer.
Unfortunately this will not work here.
The message that Excel finds the personal.xls being blocked "event" occurs
even before the code is kicksin. So, even when I did this the popup keeps on
appearing.

M.

ker_01 wrote:
Within Excel I'd use:

Application.DisplayAlerts = False
'code to open the workbook
Application.DisplayAlerts =True

in the scheduler, are you running this as a .vbs file? If so, consider


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201002/1

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Ignore the 'file in use message' when opening Excel

Additional,

Keith, triggered by your VBS question/suggestion I tried to start Excel via
VBS instead of directly calling the xls file, and that did do the trick.

Once mo Thanks for your help!

M.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201002/1

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
Open dbf file then close. do nothing..ignore any message. musa.biralo Excel Programming 3 September 27th 06 03:26 AM
How can I display a message when opening an Excel File? PeterM Excel Discussion (Misc queries) 4 November 1st 05 06:58 PM
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. Tim Marsden Charts and Charting in Excel 2 October 15th 05 02:10 PM
Display a message when opening Excel file Julie Setting up and Configuration of Excel 1 August 10th 05 06:08 PM
How- Message box on opening excel file? Buck247 Excel Programming 2 June 16th 04 03:50 PM


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