Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
R-N R-N is offline
external usenet poster
 
Posts: 4
Default How can I detect if user is in Group Mode when a macro starts?

How can I detect if the user is in Group Mode when a macro starts

I have a macro that needs to warn the user if they are in group mode before it runs its main actions. I can't find a mechanism like..
If Selection.Sheets.Count 1 or For Each aSheet In Wb.Sheets, If aSheet.Selected = True etc. etc

I have a fix that writes an unlikely entry and then looks through the sheets to see if the unlikely entry has appeared on other sheets but there must be a better way than this

Any ideas much appreciated

Rog
  #2   Report Post  
Posted to microsoft.public.excel.programming
R-N R-N is offline
external usenet poster
 
Posts: 4
Default How can I detect if user is in Group Mode when a macro starts?

Actually my fix doesn't work either
Help!!
Rog
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default How can I detect if user is in Group Mode when a macro starts?

Rog,

Try

activewindow.selectedsheets.Count 1

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"R-N" wrote in message
...
How can I detect if the user is in Group Mode when a macro starts?

I have a macro that needs to warn the user if they are in group mode

before it runs its main actions. I can't find a mechanism like...
If Selection.Sheets.Count 1 or For Each aSheet In Wb.Sheets, If

aSheet.Selected = True etc. etc.

I have a fix that writes an unlikely entry and then looks through the

sheets to see if the unlikely entry has appeared on other sheets but there
must be a better way than this!

Any ideas much appreciated.

Rog



  #4   Report Post  
Posted to microsoft.public.excel.programming
R-N R-N is offline
external usenet poster
 
Posts: 4
Default How can I detect if user is in Group Mode when a macro starts?

Bo

Yes that works - many thank

Roge

----- Bob Phillips wrote: ----

Rog

Tr

activewindow.selectedsheets.Count

--

HT

Bob Phillip
... looking out across Poole Harbour to the Purbeck
(remove nothere from the email address if mailing direct

"R-N" wrote in messag
..
How can I detect if the user is in Group Mode when a macro starts
I have a macro that needs to warn the user if they are in group mod

before it runs its main actions. I can't find a mechanism like..
If Selection.Sheets.Count 1 or For Each aSheet In Wb.Sheets, I

aSheet.Selected = True etc. etc
I have a fix that writes an unlikely entry and then looks through th

sheets to see if the unlikely entry has appeared on other sheets but ther
must be a better way than this
Any ideas much appreciated
Ro




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How can I detect if user is in Group Mode when a macro starts?

I am trying it the way you've suggested and it open the vbe window instead of file open one. sorry
--
XP home , Office 97

any or all responses are gratefully accepted and thank you for your time



"R-N" wrote:

How can I detect if the user is in Group Mode when a macro starts?

I have a macro that needs to warn the user if they are in group mode before it runs its main actions. I can't find a mechanism like...
If Selection.Sheets.Count 1 or For Each aSheet In Wb.Sheets, If aSheet.Selected = True etc. etc.

I have a fix that writes an unlikely entry and then looks through the sheets to see if the unlikely entry has appeared on other sheets but there must be a better way than this!

Any ideas much appreciated.

Rog



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How can I detect if user is in Group Mode when a macro starts?

if ActiveWindow.SelectedSheets.count 1 then
msgbox "In group mode"
End if

--
Regards,
Tom Ogilvy


"mailman" wrote in message
...
I am trying it the way you've suggested and it open the vbe window instead

of file open one. sorry
--
XP home , Office 97

any or all responses are gratefully accepted and thank you for your time



"R-N" wrote:

How can I detect if the user is in Group Mode when a macro starts?

I have a macro that needs to warn the user if they are in group mode

before it runs its main actions. I can't find a mechanism like...
If Selection.Sheets.Count 1 or For Each aSheet In Wb.Sheets, If

aSheet.Selected = True etc. etc.

I have a fix that writes an unlikely entry and then looks through the

sheets to see if the unlikely entry has appeared on other sheets but there
must be a better way than this!

Any ideas much appreciated.

Rog



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
Excel 2007 Starts in Ready Mode Owenotti Excel Discussion (Misc queries) 6 March 21st 07 09:00 PM
detect ctrl-c was pressed (in copy mode) from vba? Mad Scientist Jr Excel Discussion (Misc queries) 3 October 29th 06 06:34 AM
Allow user to run a macro in protected mode Jean Cloutier Excel Discussion (Misc queries) 2 November 23rd 05 08:55 PM
Detect event if excel is in edit mode. Rajeev Excel Programming 2 February 7th 04 02:22 PM
Detect Group mode Tim Aurthur Excel Programming 3 October 22nd 03 06:17 PM


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