Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the caption in a button control
After entering the following line:
Set btn = ActiveSheet.Shapes.AddFormControl(xlButtonControl, 160, 28, 75, 23) I try to change the caption by using btn.Caption = "caption" I receive an error when the code runs. What am I doing wrong? How can I get this to work? TIA |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the caption in a button control
Andy,
Try... btn.TextFrame.Characters.Text = "Caption" Jim Cone San Francisco, USA "Andy Dorph" wrote in message ... After entering the following line: Set btn = ActiveSheet.Shapes.AddFormControl(xlButtonControl, 160, 28, 75, 23) I try to change the caption by using btn.Caption = "caption" I receive an error when the code runs. What am I doing wrong? How can I get this to work? TIA |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the caption in a button control
try
btn.Characters.Text = "Hi There" -- Don Guillett SalesAid Software "Andy Dorph" wrote in message ... After entering the following line: Set btn = ActiveSheet.Shapes.AddFormControl(xlButtonControl, 160, 28, 75, 23) I try to change the caption by using btn.Caption = "caption" I receive an error when the code runs. What am I doing wrong? How can I get this to work? TIA |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the caption in a button control
That didn't work for me. Perhaps:
Sub Tester3() Set btn = ActiveSheet.Shapes.AddFormControl(xlButtonControl, 160, 28, 75, 23) ActiveSheet.Buttons(btn.Name).Caption = "Hi There" End Sub which did work. -- Regards, Tom Ogilvy "Don Guillett" wrote in message ... try btn.Characters.Text = "Hi There" -- Don Guillett SalesAid Software "Andy Dorph" wrote in message ... After entering the following line: Set btn = ActiveSheet.Shapes.AddFormControl(xlButtonControl, 160, 28, 75, 23) I try to change the caption by using btn.Caption = "caption" I receive an error when the code runs. What am I doing wrong? How can I get this to work? TIA |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the caption in a button control
Jim:
Thank you. It worked. "Jim Cone" wrote: Andy, Try... btn.TextFrame.Characters.Text = "Caption" Jim Cone San Francisco, USA "Andy Dorph" wrote in message ... After entering the following line: Set btn = ActiveSheet.Shapes.AddFormControl(xlButtonControl, 160, 28, 75, 23) I try to change the caption by using btn.Caption = "caption" I receive an error when the code runs. What am I doing wrong? How can I get this to work? TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change caption of a button | Excel Worksheet Functions | |||
Caption control on shapes | Excel Discussion (Misc queries) | |||
Change caption on a macro button | Excel Worksheet Functions | |||
Option button caption | Excel Programming | |||
Caption of a button | Excel Programming |