Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Sep 2001
    Posts
    211
    Thanks
    32
    Thanked 0 Times in 0 Posts

    Creating a macro with formatting (2002/Rel. 10)

    I have created a macro to insert a "checkmark" in a cell using a keyboard shortcut. I would like the macro to center and bold the checkmark, also. I have tried a couple of things, but just don't know enough about the language to make it work. Thanks : -)

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating a macro with formatting (2002/Rel. 10

    Add this immediately following where the check is inserted. I'm assuming the check is a WindDing font...


    With Selection
    .Font.Bold = True
    .HorizontalAlignment = xlCenter
    End With

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Creating a macro with formatting (2002/Rel. 10)

    If the cell is A1 you can use something like:

    With Range("A1")
    .Font.Bold = True
    .HorizontalAlignment = xlCenter
    End With

    [note: a good way to learn the syntax is to record a macro manually making the changes. This will show you the items to change...]

    Steve

Posting Permissions

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