none
how can I increase the size of font when a button is clicked? RRS feed

  • Question

  • Hi VBA developers

    I am working on a small form for a word document that is to increase the font size of the selected text by  two when the "increase size" button is clicked, similarly I have to decrease the selected text by 2 when the "decrease size" button is clicked but it cannot go smaller than 7 points,
    however when I click either button nothing happens

    below I have embedded the code snippet for a visual of my target

    'button to encrease font size by 2
    private sub  btnIncrease_Click()
    selection.font.size = selection.font.size + 2
    end sub
    
    
    'button to decrease font size by 2
    private sub btnDecrease_Click()
    selection.font.size = selection.font.size - 2
    end sub
    


     

    Friday, September 23, 2011 10:34 PM

Answers

All replies