Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
shell - open document | Excel Programming | |||
Open document with Shell | Excel Programming | |||
Using Shell to open files with more than one word in their name | Excel Programming | |||
Using Shell to open files with more than one word in their name | Excel Programming | |||
Shell to different app then open file within | Excel Programming |