LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Erratic Behaviour of Buttons

I have been trying for several days to attach some buttons to a worksheet,
to set the properties caption and colour, and to assign a macro to each of
them.

Somehow I have actually achieved this with some of them, but I do not know
how. When I right click a button (in design mode) I get different messages
for each.

For instance, one button has the caption "Update" and when I right click
this I get a menu:
Cut, Copy, .. . Edit Text, Grouping, Order, Assign Macro, Format Control.
Right clicking this a second time seems to turn off design mode and "Assign
Macro" disappears from the list.
This does not toggle with the first list on reclicking. Design mode has to
be turned on again.

But another button "Find Unique Values", when I right click it, produces
Cut, Copy,....Properties, View Code, Command Button Object, Grouping, Order,
Format Control.

Note that the options "Properties" and "View Code" are not available for the
first button, and that "Assign Macro" is not available for the second
button.

The behaviour of the "Find Unique Values" button follows that described
(for commandbuttons) in Richard Shepherd's "Excel VBA Macro Programming".
When not in design mode, the button does not react to a right click; a macro
can be assigned by inserting it in Private Sub CommandButton1_Click(). In
the properties menu I find "CommandButton1 Command Button", and "Sheet6
Worksheet", but none of my other buttons are listed.

So it seems that the "Update" button, and other like it, cannot be
commandbuttons. The behaviour of the "Update" button does not follow
Shepherd. It responds to a right click when not in design mode, and offers
the option "Assign Macro". This is very convenient, but on the other hand I
cannot change the properties.So if such buttons are not commandbuttons, what
are they? If I right click "Update" and then call up "Properties" by right
clicking the sheet tab, I get properties for Sheet6 and the CommandButton1
only.

To confuse the issue further, the "Find Unique Values" button, on right
clicking, sometimes comes up with a different menu: "Move Here, Copy Here,
Cancel". Click "Cancel" and reclick, and the same menu appears. Click
somewhere outside the menu and reclick and the "Cut, Copy, Properties..."
options return. I have not fathomed how I can deliberately get the "Move
Here..." menu to pop up.

To sum up,
(1) can someone tell me how to change to properties of buttons to which I
can assign a macro,
and what kind of buttons are these, if not commandbuttons? What must I click
in the toolbox to get such a button?

(2) Alternatively, can one assign a macro to a commandbutton without having
to paste it into the code window?

(3) What causes the "Move/Copy Here" window to appear ? (And what is meant
by "Here"?)

Thanks in advance for any help!

RogerPB



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup Value from Table erratic shriil Excel Worksheet Functions 4 March 16th 09 02:23 PM
Erratic display of concatenation Colin Hayes Excel Worksheet Functions 3 October 3rd 08 02:18 AM
Automatic Completion Erratic jimjomac Excel Discussion (Misc queries) 1 February 3rd 08 05:10 PM
Erratic Cursor Behavior Cathy C Excel Discussion (Misc queries) 6 June 18th 05 04:17 PM
Data Validation erratic bevavior Otto Moehrbach[_6_] Excel Programming 14 February 15th 04 07:29 PM


All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"