What does this mean? "Can't execute code in design mode"

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

Guest

I sometimes work in manual calculation b/c of the size of my files. A few
weeks ago, I started get a Microsoft Visual Basic dialog box that pops up
every time I hit the F9 button (to force the cells to calculate) that says
"Can't execute code in design mode". The sheet will still complete its
calculations after I hit OK.

As far as I can remember, nothing has changed in Excel for me. Can anyone
shed any light on this issue?

Thanks,
Danni
 
Try showing the Control toolbox toolbar.

In xl2003, View|Toolbars|Control Toolbox
There's an icon on that toolbar call Design mode. Does it look depressed (but
not sad!)?

If yes, click on it to leave design mode--it's toggles on/off.
 
Do you have any code designed to run at the Calculate event. To check this
right click on the XL icon next to File in the Excel menu and select View
Code. Look for a sub that starts like this...

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)

If there is nothing like that then you need to select each sheet from the
project explorer (in the VBE hit Ctrl + R to bring up the explorer) by
doubleclicking the sheet. You are looking for code starting with...

Private Sub Worksheet_Calculate()

If you have any code like that then this is the culpret. Your sheet is in
design mode and your macros can't execute. To get your book out of design
mode bring up the Control Toolbox or the Visual Basic Toolbar and click the
icon that looks like a triangle and ruler.
 
Back
Top