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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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 said:
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!
 
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 said:
How can I detect if the user is in Group Mode when a macro starts
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. etcsheets to see if the unlikely entry has appeared on other sheets but ther
must be a better way than this
 
I am trying it the way you've suggested and it open the vbe window instead of file open one. sorry
 
if ActiveWindow.SelectedSheets.count > 1 then
msgbox "In group mode"
End if

--
Regards,
Tom Ogilvy


mailman said:
I am trying it the way you've suggested and it open the vbe window instead of file open one. sorry
sheets to see if the unlikely entry has appeared on other sheets but there
must be a better way than this!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top