View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Command button moves even with don't move or resize checked.

In xl2003, you can show the forms toolbar (view|toolbars) and insert a button
from that forms toolbar.

They look almost the same.

The main difference is that the commandbutton (from the control toolbox toolbar)
has a "CommandButton1_Click()" event where the code is located.

The buttons from the Forms toolbar are assigned macros. These macros will live
in a General module--not behind the worksheet.

So you'll have to move (and probably(?) have to modify the code slightly) to a
general module. And then rightclick on the button and choose assign macro.

Depending on what the code is, it may be minor changes -- or none.

kelee wrote:

I was using the same macro format for several worksheets and inserted a
command button in each of them. Still did the same thing. Can you insert
the forms button into the worksheet? I've never tried to do that as usually
the macros are for my use only. This one is for other people and I need to
make it easier.

"Dave Peterson" wrote:

You're not the first to have this problem.

Some posters have reported that if they delete the commandbutton and add a new
one, the problem goes away (temporarily????).

I usually use buttons from the Forms toolbar. They seem to behave much better.

kelee wrote:

I have a command button that starts a macro that deletes, resizes, clears,
etc various sheets in my workbook. I have formatted it so it isn't supposed
to resize or move but it still does and gets smaller and moves every time I
click on it.

Any ideas?


--

Dave Peterson


--

Dave Peterson