Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rob,
The following worked for me: Sub Tester() ActiveSheet.Shapes("Option Button 4").Select With Selection.ShapeRange.Fill .Visible = msoTrue .Solid .ForeColor.SchemeColor = 10 .Transparency = 0.5 End With With Selection.ShapeRange.Line .Weight = 1.5 .DashStyle = msoLineSolid .Style = msoLineSingle .Transparency = 0# .Visible = msoTrue .ForeColor.SchemeColor = 39 .BackColor.RGB = RGB(255, 255, 255) End With End Sub -- --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rob,
Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Norman -- I'm specifically looking to "bold" the text -- does your codes
show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rob,
You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can simply select the text of the caption and use normal formatting
Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mangesh,
You can simply select the text of the caption and use normal formatting And this works for you with a Forms Toolbar option button caption? Additionaaly, could you provide me with code to do this programmatically? Regards, Norman "Mangesh Yadav" wrote in message ... You can simply select the text of the caption and use normal formatting Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveSheet.Shapes("Button 1").Select
With Selection.Characters(Start:=1, Length:=8).Font .Name = "Arial" .FontStyle = "Bold" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With for VBA solution. Mangesh "Mangesh Yadav" wrote in message ... You can simply select the text of the caption and use normal formatting Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mangesh.
ActiveSheet.Shapes("Button 1").Select How does this relate to the OP's "OptionButton (radio button)"? Can you provide equivalent code for a Forms option button? --- Regards, Norman "Mangesh Yadav" wrote in message ... ActiveSheet.Shapes("Button 1").Select With Selection.Characters(Start:=1, Length:=8).Font .Name = "Arial" .FontStyle = "Bold" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With for VBA solution. Mangesh "Mangesh Yadav" wrote in message ... You can simply select the text of the caption and use normal formatting Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please remove
(Start:=1, Length:=8) part from the code. Mangesh "Mangesh Yadav" wrote in message ... ActiveSheet.Shapes("Button 1").Select With Selection.Characters(Start:=1, Length:=8).Font .Name = "Arial" .FontStyle = "Bold" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With for VBA solution. Mangesh "Mangesh Yadav" wrote in message ... You can simply select the text of the caption and use normal formatting Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Norman,
provided the code in the follow-up post. Once again... ActiveSheet.Shapes("Button 1").Select With Selection.Characters.Font .Name = "Arial" .FontStyle = "Bold" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Mangesh "Norman Jones" wrote in message ... Hi Mangesh, You can simply select the text of the caption and use normal formatting And this works for you with a Forms Toolbar option button caption? Additionaaly, could you provide me with code to do this programmatically? Regards, Norman "Mangesh Yadav" wrote in message ... You can simply select the text of the caption and use normal formatting Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Apologies. My mistake. I mis-read it as a simple button and not an
option-button. Mangesh "Norman Jones" wrote in message ... Hi Mangesh. ActiveSheet.Shapes("Button 1").Select How does this relate to the OP's "OptionButton (radio button)"? Can you provide equivalent code for a Forms option button? --- Regards, Norman "Mangesh Yadav" wrote in message ... ActiveSheet.Shapes("Button 1").Select With Selection.Characters(Start:=1, Length:=8).Font .Name = "Arial" .FontStyle = "Bold" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With for VBA solution. Mangesh "Mangesh Yadav" wrote in message ... You can simply select the text of the caption and use normal formatting Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Mangesh and Norman for your help! I haven't been able to check
your responses until just a little while ago and my problem has been resolved. Specifically, the following code resolved my issue: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True Thanks! Robert "Mangesh Yadav" wrote: Hi Norman, provided the code in the follow-up post. Once again... ActiveSheet.Shapes("Button 1").Select With Selection.Characters.Font .Name = "Arial" .FontStyle = "Bold" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Mangesh "Norman Jones" wrote in message ... Hi Mangesh, You can simply select the text of the caption and use normal formatting And this works for you with a Forms Toolbar option button caption? Additionaaly, could you provide me with code to do this programmatically? Regards, Norman "Mangesh Yadav" wrote in message ... You can simply select the text of the caption and use normal formatting Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#14
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
But then you are not using a control from the FORMS menu, but the control
toolbox...! Mangesh "Linking to specific cells in pivot table" crosoft.com wrote in message ... Thank you Mangesh and Norman for your help! I haven't been able to check your responses until just a little while ago and my problem has been resolved. Specifically, the following code resolved my issue: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True Thanks! Robert "Mangesh Yadav" wrote: Hi Norman, provided the code in the follow-up post. Once again... ActiveSheet.Shapes("Button 1").Select With Selection.Characters.Font .Name = "Arial" .FontStyle = "Bold" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Mangesh "Norman Jones" wrote in message ... Hi Mangesh, You can simply select the text of the caption and use normal formatting And this works for you with a Forms Toolbar option button caption? Additionaaly, could you provide me with code to do this programmatically? Regards, Norman "Mangesh Yadav" wrote in message ... You can simply select the text of the caption and use normal formatting Mangesh "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi Norman -- I'm specifically looking to "bold" the text -- does your codes show this? thanks, Rob "Norman Jones" wrote: Hi Rob, Sorry, I missed the reference to 'text'. Try: ActiveSheet.Shapes("Option Button 4").Select Selection.Characters.Text = "CHOICE 2" --- Regards, Norman "Linking to specific cells in pivot table" crosoft.com wrote in message ... Hi, Is there a way to format the text of an OptionButton (from "Forms") in a macro? When I try to record a macro to do this, the macro doesn't seem to recognize what I'm doing (I'm right clicking on the radio button, selecting "Properties", then selecting Font, then changing to "Bold"). Any help is appreciated! Thanks, Rob |
#15
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mangesh,
"Mangesh Yadav" wrote in message ... But then you are not using a control from the FORMS menu, but the control toolbox...! "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman |
#16
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Norman,
Yes, I had seen it. Mangesh "Norman Jones" wrote in message ... Hi Mangesh, "Mangesh Yadav" wrote in message ... But then you are not using a control from the FORMS menu, but the control toolbox...! "Norman Jones" wrote in message ... Hi Rob, You originally said: Is there a way to format the text of an OptionButton (from "Forms") in a macro? I am not aware of a way to enbolden the caption of an option button from the Forms toolbar. If, in fact, you refer to an option button from the Control Toolbox, try: ActiveSheet.OLEObjects("OptionButton1"). _ Object.Font.Bold = True --- Regards, Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting a radio button | Excel Worksheet Functions | |||
Formatting the text in an option (radio) button | Excel Discussion (Misc queries) | |||
Changing Text in a Forms Button | Excel Programming | |||
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True | Excel Worksheet Functions | |||
userform Radio button updates text box | Excel Programming |