Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2007, 03:02 PM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default make option button = bold

I have three option buttons in cells a1:b2, c1:d2 and e1:f2. Here is the problemn when i click on these option buttons it should automatically change the cells selected to bold, italic and regular respectively. Here is what i have so far:
Code:
Public Sub OptionButton1_click() 
    Sheet1.Select 

    ActiveSheet.OLEObjects("OptionButton1").font.bold=True 

End Sub
Can anypne help please because i really don't have a clue in what i'm doing.
Thank You


 
Old March 25th, 2007, 11:07 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

You need to boldface the cells right!


You can try the following

If OptionButton1 = True then
     ActiveSheet.Range("a1:b2").font.bold=True
Elseif OptionButton2= True then
     ActiveSheet.Range("c1:d2").font.bold=True
Elseif OptionButton3 = True then
     ActiveSheet.Range("e1:f2").font.bold=True
End if

Cheers
Shasur

http://www.vbadud.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to suppress "Make available offline" option kvkknk Javascript How-To 2 January 31st, 2007 12:58 PM
Opening Using Option Button anukagni Access 9 June 23rd, 2006 07:10 AM
make website with two languages option (EN and FR) crmpicco Classic ASP Basics 0 June 2nd, 2006 10:46 AM
Make a image button as default submit button toshi ASP.NET 1.0 and 1.1 Basics 1 June 1st, 2006 05:25 AM
Option Button help mohiddin52 Access 2 September 2nd, 2005 11:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.