ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I detect if user is in Group Mode when a macro starts? (https://www.excelbanter.com/excel-programming/293760-how-can-i-detect-if-user-group-mode-when-macro-starts.html)

R-N

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

R-N

How can I detect if user is in Group Mode when a macro starts?
 
Actually my fix doesn't work either
Help!!
Rog

Bob Phillips[_6_]

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




R-N

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





Mailman

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


Tom Ogilvy

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





All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com