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: 1
Default Shell function. Open Excel swtiches

I've written some vba code (in my 'Control Panel') that uses the Shell
function to open another instance of Excel which opens 'Report.xls'
that process some stuff (pivot table refreshes etc) for a few mins
then closes. I'll eventually want a few of these instances opening
concurrently.

This is the code i used:
Shell "C:\Program Files\Microsoft Office\OFFICE11\Excel.exe C:\Folder
\Report.xls", vbMinimizedNoFocus


My problem is that 'Personal.xls' is getting in the way. When the new
instance of Excel opens, how do I handle (in code) the message that
says "Personal.xls locked for editing. Read Only, Notify, Cancel".

I thought of moving Personal.xls out of my XLStart folder and only
opening it when i need it, but i need it all the time.

I know that there are switches you can use but none of them (that i
know of) seem appropriate. (see examples below) Opening a 'blank'
session with /e doesn't work because it still opens Personal.xls.
Opening in safe mode with /s doesn't open Personal.xls but it also
won't allow me to run the macros I need to run in 'Report.xls'.

Shell "C:\Program Files\Microsoft Office\OFFICE11\Excel.exe /e C:
\Folder\PivotReport.xls", vbMinimizedNoFocus

Shell "C:\Program Files\Microsoft Office\OFFICE11\Excel.exe /s C:
\Folder\PivotReport.xls", vbMinimizedNoFocus


Any ideas anyone?
Thanks in advance!!
(this is my very first post, I can usually find answers by looking at
other people's posts but not this time!)

 
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
shell - open document Jarle Excel Programming 6 April 8th 08 10:01 PM
Open document with Shell Jarle Excel Programming 1 April 4th 08 02:38 PM
Using Shell to open files with more than one word in their name Phil1982 Excel Programming 3 March 16th 06 09:26 PM
Using Shell to open files with more than one word in their name Tom Ogilvy Excel Programming 0 March 16th 06 06:55 PM
Shell to different app then open file within Justin[_12_] Excel Programming 0 November 30th 04 11:26 PM


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

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"