View Single Post
  #20   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default activating windows

Clif McIrvin wrote on 3/11/2011 :
"GS" wrote in message
...
on 3/11/2011, Clif McIrvin supposed :
Absolutely. That's why, when he said your code wasn't working for him, I
questioned whether or not he had multiple instances.


So then, you're suggesting he thought the file was open but when he ran the
code in the instance he ran from, the file was not open in that instance.


Correct.


The casual observer would have no idea whether they were running multiple
instances or not.


Huh.., you might be right! I find it hard to believe, though, since one
must deliberately start another instance while an existing instance is
running.


It's not that difficult to construct a shortcut that launches a new instance
of Excel, and if the user was using provided shortcuts they would never know.


Another possibility is that an automated instance is running with its
'IgnoreRemoteRequests' property set 'True' so when a user double-clicks a
file in explorer it starts the default instance of Excel. If the author of
the automated instance didn't change the Caption/Icon for the running app
then there'd be 2 Excel icons on the taskbar.


I started getting acquainted with Office and Excel w/ 2003 (Win XP
Professional). As I recall, I have *always* had a distinct Excel icon on the
taskbar for every open workbook -- whether I had one or three (or whatever)
instances of Excel running, so the taskbar icons are useless as an indicator
whether there are multiple instances of Excel running (unless both instances
have no open workbook.) Now that my company switched to Office 2010 I still
get a taskbar icon for each open workbook .... I don't recall, I may have
changed a setting because I was used to seeing it that way.


This is controlled by the 'WindowsInTaskbar' property setting. I don't
see this in any UI dialogs for v2007. I can't speak to v2010 because I
haven't installed it yet. (Most my clients use 2003/7) [1]

In XP I get a separate icon on the taskbar for each instance. I get an
entirely different icon for an automated instance running my app[s].
This is how I tell them apart: -my app's instance has a different
Icon/Caption.

[1] I'll probably get around to it when a client starts using the
64bit version. I haven't decided yet whether to set up my Win7 x64
machine with VB6 because I haven't found out if MSO32 and MSO64 can
coexist on the same machine. I suppose I can just continue to do x32
stuff on my XP machine, but it would be more convenient to do it on the
Win7 x64 machine.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc