none
VBA TO CHANGE FONT RRS feed

  • Question

  • Using this code as part of a data copy routine:

    Sub NEXTSUB()
    Range("g1074:O1074") = ""
    Range("G1074") = "*"
    Call COPYDATA
    Range("G1074") = "EXTERIOR WALLS"

    Call COPYDATA
    Call EWALL
    End Sub

    typical font is calibri size 11

    how do I change "EXTERIOR WALLS" font to bold and size to 12

    Monday, February 22, 2016 11:11 PM

Answers

  • How about this?

    ' -- Range("G1074") = "EXTERIOR WALLS"
    With 
    Range("G1074")
        .Value =
    "EXTERIOR WALLS"
        .Font.Size = 12
        .Font.Bold = True
    End with

    • Edited by Ashidacchi Tuesday, February 23, 2016 3:13 AM
    • Proposed as answer by André Santo Tuesday, February 23, 2016 11:03 AM
    • Marked as answer by 6da4 Tuesday, February 23, 2016 1:51 PM
    Tuesday, February 23, 2016 3:09 AM

All replies

  • How about this?

    ' -- Range("G1074") = "EXTERIOR WALLS"
    With 
    Range("G1074")
        .Value =
    "EXTERIOR WALLS"
        .Font.Size = 12
        .Font.Bold = True
    End with

    • Edited by Ashidacchi Tuesday, February 23, 2016 3:13 AM
    • Proposed as answer by André Santo Tuesday, February 23, 2016 11:03 AM
    • Marked as answer by 6da4 Tuesday, February 23, 2016 1:51 PM
    Tuesday, February 23, 2016 3:09 AM
  • Thanks...works perfectly
    Tuesday, February 23, 2016 1:51 PM