Thread: Command Bar
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Command Bar

Thanks- I really appreciate your help
-----Original Message-----
Use the LEFT method on it.

ActiveCell.Value = Left

(Application.CommandBars.ActionControl.Caption,
2)


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
Thanks, it works well

I only want the cell to have the first couple of
characters from the selected control. Is there a way to
truncate ActiveControl.caption? I tried setting it to a
string variable but got a data mismatch error.

-----Original Message-----
Point the OnAction property to a macro, and in the

macro
you can get the
caption with

ActiveCell.Value =

Application.CommandBars.ActionControl.Caption


--

HTH

Bob Phillips
... looking out across Poole Harbour to the

Purbecks
(remove nothere from the email address if mailing

direct)

"DEFJ" wrote in

message
...
Is there a way to set a command bar's "OnAction"

property
to place the commandbar's caption in a cell?

I need a hint.
What I'm trying to do is make a right-click button

that
lists choices for a user to place in the target cell.

The
amount of choices will vary. I've got the

commandbar
code down but was wondering if there was a way to

call a
macro that looks at the caption of the selected

control.


.



.