krodriguez
Board Regular
- Joined
- Jul 11, 2012
- Messages
- 119
Hello,
I have the following code with 2 macros and will like to run it all at once, how can I do this? Thanks
Sub SaveSheetsAsFiles()
Dim SheetsToSave
SheetsToSave = Array("Rainbow", "RLN-Net Realization", "RLN-Red Rev", "RLN-COGS", "RLN-Logistics", "RLN-R&D", "RLN-Selling", "RLN-Administrative", "RLN-Advertising", "RLN-Sales Promo") 'change tab names to suit
Application.ScreenUpdating = False
For Each sht In Sheets(SheetsToSave)
sht.Copy
'file location is same as workbook the code is in. Change to suit
'file format is .xlsm - change to suit
ActiveWorkbook.SaveAs Filename:=sht.Name & ".xlsm", FileFormat:=52
Next sht
Application.ScreenUpdating = True
End Sub
Sub SaveSheetsAsFiles2()
Dim SheetsToSave
SheetsToSave = Array("Neocell", "NC-Net Realization", "NC-Red Rev", "NC-COGS NC-Logistics", "NC-R&D", "NC-Selling", "NC-Administrative", "NC-Advertising", "NC-Sales Promo") 'change tab names to suit
Application.ScreenUpdating = False
For Each sht In Sheets(SheetsToSave)
sht.Copy
'file location is same as workbook the code is in. Change to suit
'file format is .xlsm - change to suit
ActiveWorkbook.SaveAs Filename:=sht.Name & ".xlsm", FileFormat:=52
Next sht
Application.ScreenUpdating = True
End Sub
I have the following code with 2 macros and will like to run it all at once, how can I do this? Thanks
Sub SaveSheetsAsFiles()
Dim SheetsToSave
SheetsToSave = Array("Rainbow", "RLN-Net Realization", "RLN-Red Rev", "RLN-COGS", "RLN-Logistics", "RLN-R&D", "RLN-Selling", "RLN-Administrative", "RLN-Advertising", "RLN-Sales Promo") 'change tab names to suit
Application.ScreenUpdating = False
For Each sht In Sheets(SheetsToSave)
sht.Copy
'file location is same as workbook the code is in. Change to suit
'file format is .xlsm - change to suit
ActiveWorkbook.SaveAs Filename:=sht.Name & ".xlsm", FileFormat:=52
Next sht
Application.ScreenUpdating = True
End Sub
Sub SaveSheetsAsFiles2()
Dim SheetsToSave
SheetsToSave = Array("Neocell", "NC-Net Realization", "NC-Red Rev", "NC-COGS NC-Logistics", "NC-R&D", "NC-Selling", "NC-Administrative", "NC-Advertising", "NC-Sales Promo") 'change tab names to suit
Application.ScreenUpdating = False
For Each sht In Sheets(SheetsToSave)
sht.Copy
'file location is same as workbook the code is in. Change to suit
'file format is .xlsm - change to suit
ActiveWorkbook.SaveAs Filename:=sht.Name & ".xlsm", FileFormat:=52
Next sht
Application.ScreenUpdating = True
End Sub