Excel VBA Italic text guide

posted in: Excel Tutorials | 0

Excel VBA Italic text guide

excel tutorials for dummies

Italic VBA Tutorial

In this tutorial we outline how you can use VBA code to make selected text appear in Italic. This is very useful if you have a macro that enters new text and you would like that text to appear in Italic automatically. Our Italic VBA code is very simple and can be applied to many different macros where you wish to use VBA to format text.

Font Italic VBA guide

In our working example, we have a simple macro that selects cells A6 to F6 on Sheet1  and then uses Italic VBA code to make the text in those selected cells Italic. This is executed by an ActiveX button press that we have entitled “Excel VBA Italic”. The image below is before the macro is executed.

excel vba italic text

Excel VBA Italic Text code

The code that we used in our example is as follows and will need to be edited to fit into your own macros for your own purposes. You will need to change the ranges to match the selection for the text that you wish to make Italic, the rest of the code can be left unaltered. Please visit our guide on how to edit macro code to fit your own needs if you are unsure of this process.

Private Sub CommandButton1_Click()


Selection.Font.Italic = True

End Sub

Once the macro has run, the cells you selected should have been formatted in Italic, such as our example image below.

VBA Format Text Italic example

excel vba italic text

This concludes our Excel VBA Italic text guide. If you have struggled to follow along with any of this process then please visit the beginner’s guide which will help you get started and able to follow this guide comprehensively.

If you have struggled with any of this process, please also view the associated video tutorial which can be found below.

Excel VBA Italic Video Tutorial

For further Microsoft Excel Tutorials please visit my YouTube channel, a video like or subscribe is always appreciated.


Leave a Reply