cannot execute code in break mode?

RPM7

Board Regular
Joined
Nov 28, 2007
Messages
191
I'm a a complete novice with VBA. I have set up a sheet with macro buttons that hide/unhide rows to give a different display on screen. I have also set up a reset button which i have set to return all cells to a default status and hide all the rows except those of the first display. Everything seems to work ok except the reset button.
I get the message "cannot execute code in break mode". Can anyone help?
 
Cindy, I'm a complete tool.
I've finally figured out what was screwing it all up.
I forgot to unprotect an protect the code to enable the macro buttons. When I made all the other buttons I had to put in a code

''Private Sub CommandButton1_Click()
Sheets("sheet name").Unprotect "password"

.........rest of the code.........

Sheets("sheet name").Protect "password".
End Sub

I'm sorry for wasting all your time on this one. But thanks everyone for helping.
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Problem-solving is never a waste of time. It's always a challenge to figure out what might have possibly gone wrong to cause the problem...I think it wards off senility :)
As you write more macros, you'll have a better history of your own mistakes to draw from in terms of solutions...and one day you'll find that you're answering someone else's questions because you had the same problem before and solved it.
Best of luck,
Cindy
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top