Forms menu button question

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

Guest

Greetings and TIA for your time
I am using forms menu butons on Chart sheets to fire macros. All is well
until the user groups these sheets and then tries to press the button -
nothing happens, no macro is fired. I would like to message the user "please
ungroup sheets before pressing this button"
I've thought of including the message in the button text but this seems a
bit clumsy. Is there a better solution?
 
Option Explicit
Sub testme06()
If ActiveWindow.SelectedSheets.Count > 1 Then
MsgBox "nope, nope, nope"
Exit Sub
End If
End Sub
 
Dave,
Thanks for your response
I,m still left with the same problem though...
My user is free to navigate around the workbook, print off a group of sheets
etc. When he has a group of sheets selected and then attempts to press a
button on a chart sheet, no macro will fire (buttons on chart sheets appear
to be dead when sheet is grouped) I need to tell him at that point for that
particular scenario only, that he needs to ungroup sheets before pressing the
button
 
I created a multi-sheet workbook. I put a button from the forms toolbar on a
chart sheet. I assigned it my test macro.

I grouped a bunch of sheets with that chart sheet active. I pushed that button
and got "nope, nope, nope" back.

I used xl2003--if you used something else, maybe someone can test it. (I would
still expect it to work fine, though.)
Dave,
Thanks for your response
I,m still left with the same problem though...
My user is free to navigate around the workbook, print off a group of sheets
etc. When he has a group of sheets selected and then attempts to press a
button on a chart sheet, no macro will fire (buttons on chart sheets appear
to be dead when sheet is grouped) I need to tell him at that point for that
particular scenario only, that he needs to ungroup sheets before pressing the
button
 
Back
Top