Command Button Problem

  • Thread starter Thread starter Monte Comeau
  • Start date Start date
M

Monte Comeau

Hi all,

I use several command buttons on the top of my sheet as menu buttons to
navigate to bookmarks throughout my worksheet. This saves scrolling down
several hundred rows to find the area of the sheet you want to enter data
into.

The problem is this: They do not work when I first open the sheet. The
only way they will work is if I create new one, then they all function as
they should. I have been creating a new button and then using the undo
command to erase it every time I open my sheet to enable the other buttons.
Is there a setting I am unaware of? Or is there another problem?

Thanks for any help.
 
I've never seen this behavior.

You may want to post your version of excel,
the type of commandbuttons (from the Forms toolbar or Controltoolbox toolbar??)
and the code that doesn't work.

And just a guess:
If you have "on error resume next" in your code, you could be masking an error.

And if you're using xl97 and you're using the commandbuttons from the
controltoolbox toolbar, then try changing the .takefocusonclick property to
false.

(But that doesn't explain why your addition/undo makes them work.)
 
I am using Excel 2002.

I think I found why it happens but not how to fix it.

On the CONTROLS toolbar there is a button that looks like drafting tools.
It is used for EXITING or ENTERING design mode. When I am in design mode
all buttons work properly. When I EXIT design mode they do not work. I
suppose my creating a new button automatically entered me into design mode
and that is why the buttons worked.

So, how do I make my control buttons work when NOT in design mode?
 
It should be the other way around, when you are in design mode you cannot
use the button..
Maybe you have them confused? All that should happen is that when you click
the button
you'll get

=EMBED("Forms.CommandButton.1","")

in the formula bar and the button will get the handles (for formatting etc)

--

Regards,

Peo Sjoblom

Monte Comeau said:
I am using Excel 2002.

I think I found why it happens but not how to fix it.

On the CONTROLS toolbar there is a button that looks like drafting tools.
It is used for EXITING or ENTERING design mode. When I am in design mode
all buttons work properly. When I EXIT design mode they do not work. I
suppose my creating a new button automatically entered me into design mode
and that is why the buttons worked.

So, how do I make my control buttons work when NOT in design mode?



Dave Peterson said:
I've never seen this behavior.

You may want to post your version of excel,
the type of commandbuttons (from the Forms toolbar or Controltoolbox toolbar??)
and the code that doesn't work.

And just a guess:
If you have "on error resume next" in your code, you could be masking an error.

And if you're using xl97 and you're using the commandbuttons from the
controltoolbox toolbar, then try changing the .takefocusonclick property to
false.

(But that doesn't explain why your addition/undo makes them work.)
function
 
Like Peo, I think you got a little mixed up in your post--the buttons won't work
in design mode, but will work when you're not in design mode.

The only time I've see a workbook open in design mode is when macros are
disabled or when I held the shift key down when opening the workbook.

I could see this in one more situation (just tested).

If I had a macro in a different workbook that opened the workbook, then it
worked ok.

But!!!

If I assigned a shortcut key to that macro and that shortcut key included the
shiftkey, then my workbook was opened in design mode.

Any chance that the shiftkey is coming into play?
 
If I had a macro in a different workbook that opened the workbook, then it
worked ok.

But!!!

If I assigned a shortcut key to that macro and that shortcut key included the
shiftkey, then my workbook was opened in design mode.

Any chance that the shiftkey is coming into play?

"Eat your heart out " Clarice Starling.
 
I know the reference to Clarice Starling (Silence of the Lambs), but I have no
idea what that quote means.

The world is a more interesting place with you in it, Peo.
 
I thought I would use Sherlock Holmes first but realized
that you are a fan of the dear doctor.
It was a reference (albeit not absolute) to the thoroughness
with which you seem to use. Where on earth would you
come up testing it with a Shift keyboard shortcut? <g>
 
No, I do not have them confused. When the worksheet opens the buttons do
not work at all.
I do not have any macros used in the sheet. The buttons appear to work like
they should, they depress and pop back out on mouse-click but nothing
happens. They do not have the hand/finger cursor that indicates they are
active, but the regular arrow cursor. As soon As I click the DESIGN MODE
toggle button they work fine. When I click it again to EXIT DESIGN MODE the
buttons no longer work. Something seems to be backwards here...


Peo Sjoblom said:
It should be the other way around, when you are in design mode you cannot
use the button..
Maybe you have them confused? All that should happen is that when you click
the button
you'll get

=EMBED("Forms.CommandButton.1","")

in the formula bar and the button will get the handles (for formatting etc)
 
How are they supposed to work? You say that you don't have any macros.
When they do work what are they doing?
 
I thought that some type of Absolut might have something to do with that post!

Holding the shiftkey when opening a workbook with auto_open/workbook_open code
stops the code from executing.

There have been several posts that complain about open code not running when
started via other macros (with shortcut keys).

I think I saw Myrna Larson's explanation/theory first.

And it kind of fits with the design mode problem.
 
They work as a menu. You click on a button and they take you to a soecified
spot in the sheet.
 
Back
Top