Uploaded by Arjun chandrasekar

Print all worksheet as separate file Macro

advertisement
1. to print all excel worksheets as separate pdf file.
Sub prt()
Dim Folder_Path As String
With Application.FileDialog(msoFileDialogFolderPicker)
.Title = "Selectthe folder Path"
If .Show = -1 Then Folder_Path = .SelectedItems(1)
End With
For Each sh In ActiveWorkbook.Worksheets
sh.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Folder_Path & Application.PathSeparator & sh.Name & ".pdf"
Next
End Sub
2. to filter strike through text in excel.
Sub Macro6()
Range("A1").Select
With Application.FindFormat.Font
.Strikethrough = True
.Subscript = False
.TintAndShade = 0
End With
With Application.ReplaceFormat.Interior
.PatternColorIndex = xlAutomatic
.Color = 10498160
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Cells.Replace What:="", Replacement:="", LookAt:=xlPart, SearchOrder:= _
xlByRows, MatchCase:=False, SearchFormat:=True, ReplaceFormat:=True, _
FormulaVersion:=xlReplaceFormula2
End Sub
Download