Sub HighlightMisspelledCells() Dim cl As Range For Each cl In ActiveSheet.UsedRange If Not Application.CheckSpelling(word:=cl.Text) Then cl.Interior.Color = vbRed End If Next cl End Sub
Sub SaveWorkshetAsPDF() Dim ws As Worksheet For Each ws In Worksheets ws.ExportAsFixedFormat xlTypePDF, "C:UsersSumitDesktopTest" & ws.Name & ".pdf" Next ws End Sub
HOW TO DISABLE MACROS IN EXCEL IF USING MAC HOW TO
To use this code, follow the instructions on how to run macros outlined above.
HOW TO DISABLE MACROS IN EXCEL IF USING MAC CODE
You can find this code in your saved macros. Finally close the window and go back to your workbook.Select the module and go to the right tab.Now the new module has to appear in the left tab and you can add a code.Right-click on it and choose Insert > Module.In the Project Explorer choose a workbook to which you wish to add a macro.To add a code, open the workbook and press ALT+F11 to open VB Editor or click on Visual Basic in the left corner of the menu.If you want to perform an action that involves a specific macro code, you can use the instructions and the list of the codes below. How to use specific Macro codes on your Excel file?
In the pop-up window choose the macro you want to use and click Run.To run saved macros, go to Developer tab and select Macros.Now your macro is saved and you can use it whenever you want. When you finish, click Stop Recording.Click OK and perform the action you’d like to save.In the name section write a name for this macro, choose a shortcut key and the description for the process this macro does.