Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2008

Tip: Looking for answers? Try searching our database.

Font Size on Command Buttons - VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tcb - 02 Jan 2008 23:11 GMT
When I create a command button I can do all of the below except set
the FontStyle.  What is the correct syntax for this?

  With objActiveWkb.ActiveSheet.OLEObjects.Add("Forms.CommandButton.
1")
       .Left = intLeft
       .Top = intTop
       .Object.Caption = strButtonCaption
       .Width = intWidth
       .Height = intHeight
       .Object.Wordwrap = True
       .Object.Font.Size = 10
      ' .FontStyle = "Bold"

   End With
Dave Peterson - 03 Jan 2008 00:25 GMT
How about just

    .object.fontbold = true

I don't think there's a .fontstyle associated with this.  I didn't see it when I
added an oleobject to the watch window.

> When I create a command button I can do all of the below except set
> the FontStyle.  What is the correct syntax for this?
[quoted text clipped - 11 lines]
>
>     End With

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.