Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With worksheets("Sheet1")
Range("A1").Value = _ Application.CommandBars.ActionControl.Caption End With -- Regards, Tom Ogilvy 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
One command in one cell initiating another command in another cel. | Excel Worksheet Functions | |||
command code ( GOTO command) in formula | New Users to Excel | |||
command button add another command | Excel Discussion (Misc queries) | |||
Pivot Table Error Message - "Command Text not set for command obje | Excel Discussion (Misc queries) | |||
Excel has a "Find Next" command but no "Find Previous" command. | Excel Discussion (Misc queries) |