+ Reply to Thread
Results 1 to 5 of 5

Button Macro and Font

  1. #1
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Button Macro and Font

    Two buttons -sort by number, sort by name
    When the button is clicked, I also want to change the properties (i.e. change the font to bold - or maybe even change the font)

    I'm sure it's very simple, but I couldn't find an example

    I've attached a sample.
    Attached Files Attached Files
    Last edited by x65140; 05-16-2012 at 03:19 PM. Reason: Solved

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Button Macro and Font

    Good evening x65140
    Quote Originally Posted by x65140 View Post
    I'm sure it's very simple, but I couldn't find an example
    You're right - it is very simple. It just can't be done using Form controls like you have.
    You will need to use ActiveX controls - still in the Developer > Insert tab, they just allow far more control.

    HTH

    DominicB

  3. #3
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: Button Macro and Font

    Thanks Dominic.....so I changed to the ActiveX and I can see the properties...
    but how do i assign (font, bgcolor, etc...) depending on when it is clicked or not?

    (uploaded new file)
    Attached Files Attached Files

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Button Macro and Font

    Hi x65140

    Take a look at your workbook - I've added two lines to each routine. See if it works how you wanted.
    I've also taken the code out of the macro module - it's no longer needed now that the code is in the workbook module.

    HTH

    DominicB
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-28-2004
    MS-Off Ver
    Home/Office 2016
    Posts
    246

    Re: Button Macro and Font

    Excellent! That will get me going...Thanks!

    So much to learn......so little time......

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1