I need help in achieving the below in my excel sheet with one master MACRO VBA Code
If column A contains 0 - Delete the entire row. ( Row Killer ) - This should run on all the sheets in the workbook
Since the excel file is heavily linked - All fields needs to converted to values (E.g. Paste as Values)
Save AS file in .xls format with the file name SAMAmonthlyReport
I have the code for point 2 and 3 from this site but need help in adding the 1 point.
Below is the code
Sub CopyValuesToSync()
Dim OrigWkbkFpth As String
Dim OrigWkbk As String
Dim ValueWkbk As String
Dim WS As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
OrigWkbkFpth = Application.ActiveWorkbook.FullName
OrigWkbk = Application.ActiveWorkbook.Name
For Each WS In ActiveWorkbook.Worksheets
WS.Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
Next WS
ActiveWorkbook.SaveAs Filename:="C:\SAMA\SamaMonthly.xls", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
ValueWkbk = Application.ActiveWorkbook.Name
Workbooks.Open Filename:=OrigWkbkFpth
Windows(ValueWkbk).Activate
ActiveWindow.Close
Windows(OrigWkbk).Activate
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub