-
WSBrooke
AskWoody LoungerSo the following code will work then:
Private Sub Workbook_Open()
Dim xlApp As New Excel.Application
Set xlApp = CreateObject(“Excel.Application”)With xlApp
.Visible = True
.Workbooks.Open FileName:=”C:Docs and SetsBrookeMy Docsrevenue.xls” ‘or similar
End WithEnd Sub
However, I’ve got a sneaking suspicion that I got it horribly (and embarrassingly!) wrong with all that malarky about instances and which one a workbook gets opened in – it now looks to me as though they just get opened in the last instance you visited. Which means that there’s no point in opening a new instance. I shall have another look at that later on just to make sure, unless anyone else knows more about ‘instance precedents?’
Brooke
-
WSBrooke
AskWoody LoungerDrk,
Try putting this code in a word document (or any controller application) and run it.
Sub Start_Mock_That_App()
Dim XLObja As Object
Set XLObja = CreateObject(“Excel.Application”)With XLObja
.Visible = True
.Workbooks.Open FileName:= “C:Docs and SetsBrookeMy DocsMock_That_App.xls” ‘or similar
.Workbooks.add
End WithDim XLObjb As Object
Set XLObjb = CreateObject(“Excel.Application”)With XLObjb
.Visible = True
.Workbooks.add
End Withapplication.quit
End Sub
a) the user is opening a word document (put it in auto_open (?)) – even less likely to think your app has anything to do with excel(?)
you need two instances otherwise when your user opens an excel file through explorer it will try to open in the first instance.
c) this means that you don’t have to put code in the deactivate/activate events of Mock_That_App, which as Legare pointed out is a right pain to get right – and cuts down on redisplay time
d) you do still need code to change the first excel instance’s appearence in the open and close events of Mock_That_App though.
e)it may be possible to do an if…getobject(excel)….then 2apps = true before the first createobject and then put if 2apps then… around the second createobject
f) in case you’re wondering about how e) affects
…….
===> if I have no excel instances open and programmatically open one instance, manually opening a spreadsheet from explorer opens it in that instance.
===> if I have no excel instances open and programmatically open two instances, manually opening a spreadsheet from explorer opens it the last (programatically) opened instance.
===> if I have one excel instance open (manually opened) and programmatically open one instance, manually opening a spreadsheet from explorer opens it in the manually opened instance.
===> if I have two excel instances open (both manually opened) and programmatically open one instance, manually opening a spreadsheet from explorer opens it in the most recently opened – manually – instance.I have tested this on my works laptop – not thoroughly but a few times. It seems to hold true.
g)like Legare, I couldn’t get Excel to programatically start a new instance of itself. But I have had an idea. It goes like this… from excel, start word and open a document that has code in it’s auto open macro… hey! we could play this game all night!
h) the upshot? you’re slowly getting close to what you want but whether you’ll ever get there, well…
Brooke
-
WSBrooke
AskWoody LoungerEither Geoff’s invisible or he’s gone home.
try this – i think it’s right…
c:program filescommon filesmicrosoft sharedvbaVBEEXT1.OLB
Brooke
-
WSBrooke
AskWoody LoungerSorry old chap,
I could have sworn I had the code to do this. Can’t find it anywhere.
From memory you dim excel.app as new app – as you would for starting any other office app from excel – and go from there. How you define which instance new spreadsheets go to is temporarily (permanently?) beyond me.
I must admit to a small amount of surprise that no-one else has come back on this one. Hans? Legare? Moderators? Anyone?
Brooke
-
WSBrooke
AskWoody LoungerFor simple stuff I’ve always used excel (97) – how does it compare to this – is it worth the hassle of an extra program?
Brooke
-
WSBrooke
AskWoody LoungerWell, I tried three power supplies to no avail, had a look at the switch, still nothing, put it back together with the original power supply, checked it, same symptoms, and took the rest of the afternoon off.
Got back in an hour ago and pressed the power switch for the hell of it…. it powered up perfectly. I’ve done quite a few hard restarts since and it seems that about one in ten start-ups succeed. Once the box ‘catches’ everything seems fine, everything working perfectly.
It would seem that something is on the way out, but I guess I’ll just have to wait until it becomes terminal to find out what, though I’m going to replace the power switch anyway as i figure that’s not going to be too expensive and is the most likely culprit.
In the meantime my backups will become a little more frequent – the last one was only a fortnight ago as it happens but that is pure luck: the one previous to that was taken last year.
If I ever get to definately locate the problem I’ll let you know what it is/was but in the meantime thanks for all the advice.
Brooke
-
WSBrooke
AskWoody LoungerMy life’s on that hard-drive! What’s the smilie for blind panic? I’m off home to see when I last took a backup.
Brooke
-
WSBrooke
AskWoody LoungerI’ll have a look at that tonight. Wish me luck….
Brooke
-
WSBrooke
AskWoody LoungerAre you saying you’re not going to nip round and fix it for me? I’ve tried two spare power supplies and i get exactly the same symptoms(i.e. none). I’ve now replaced the original, though I’m not 100% sure why, and rechecked all the leads. Nothing. Maybe it’s time for professional help… And no – I didn’t take any part of the system into the shower.
Brooke
-
WSBrooke
AskWoody LoungerI’m under the impression that default toolbars are not machine specific but machine/user specific – I believe this to be the case for windows 95/98/ME. Is it possible that when the toolbar reverts to default the user has logged onto windows by a different name from which the modified toolbars were set up?
Brooke
-
WSBrooke
AskWoody LoungerFair Point. You get the whole screen.
Brooke
-
WSBrooke
AskWoody LoungerYou can. Use the mouse to activate the dropdown but don’t lift your finger off the button. Press printscreen now and the menu won’t disappear.
Brooke
-
WSBrooke
AskWoody LoungerSorry about that – I found the cover disc. What I’m using is called ACDSee from http://www.acdsystems.com – the version I use is not what’s on offer there now, but, based on my experience with whatever version is on my home system, I would recommend taking the free trial and seeing what you think . The file size is a little larger than I expected though – i might try upgrading, but I’ll do the download whilst I’m at work.
Brooke
-
WSBrooke
AskWoody LoungerI’m sure it was available for some time on cover disc in the uk. I would have a look to check that it is acd, but I’ve got a few problems with the home system. However, I’ll see whether I’ve still got the disc – if I have there should be more info on that.
Brooke
-
WSBrooke
AskWoody LoungerI’m not sure I’d go as far as saying that I know what I’m doing, but I do know a few of the things not to do…
Thanks for the advice – I’ll try swapping the psu over and hopefully that’ll fix it.
Brooke
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
41 minutes ago -
Where’s the cache today?
by
Up2you2
16 hours, 1 minute ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
8 hours, 47 minutes ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
10 hours, 32 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
16 hours, 42 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
1 day, 9 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
1 day, 9 hours ago -
regarding april update and may update
by
heybengbeng
1 day, 10 hours ago -
MS Passkey
by
pmruzicka
12 hours, 48 minutes ago -
Can’t make Opera my default browser
by
bmeacham
1 day, 18 hours ago -
*Some settings are managed by your organization
by
rlowe44
1 day, 5 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
1 day, 17 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
2 days, 13 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
2 days, 22 hours ago -
AI slop
by
Susan Bradley
16 hours, 3 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
2 days, 23 hours ago -
Two blank icons
by
CR2
7 hours, 35 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
9 hours, 33 minutes ago -
End of 10
by
Alex5723
3 days, 10 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
2 days, 8 hours ago -
test post
by
gtd12345
3 days, 17 hours ago -
Privacy and the Real ID
by
Susan Bradley
3 days, 7 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
1 day, 9 hours ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
3 days, 21 hours ago -
Upgrading from Win 10
by
WSjcgc50
2 days, 9 hours ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
2 days, 12 hours ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
4 days, 13 hours ago -
The story of Windows Longhorn
by
Cybertooth
4 days ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
4 days, 14 hours ago -
Are manuals extinct?
by
Susan Bradley
1 day, 15 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.