Hi folks, It been awhile since I played with macros and wasn't an expert to begin with.
This is what I have tried putting together. So...on click of a button the macro should open a csv file that I selected, copy and paste into my template. Then do a "save as" (to keep my template safe) then calculate the proper percentage for specific columns and delete the button and the text in a cell.
I was trying to make it close all excel file but this newly saved file but it crashed so I deleted it.
The question is, how do I clean this up and add the codes for close all but this new file?



Sub Load_CSV_File8()
'
' Load_CSV_File8 Macro
'
Range("A2").Select
FileToOpen = Application _
.GetOpenFilename("CSV Files (*.csv), *.csv")
Workbooks.OpenText FileToOpen
If FileToOpen <> False Then
MsgBox "Open " & FileToOpen
End If

Rows("1:888").Select
Selection.Copy
Windows("CSV_Loan_Loading_TEMPLATE5.xlsm").Activate
Rows("2:2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Rows("2:2").Select
Application.CutCopyMode = False
Selection.AutoFilter
Range("A2").Select

' AddPercent2 Macro
'
Range("AJ1").Select
Selection.Copy
Range("AF3:AG80").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("AC3:AC80").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("AA3:AA80").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("M3:O80").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Range("I3:J80").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Style = "Percent"
Selection.NumberFormat = "0.00%"
Range("AF3:AG80").Select
Selection.Style = "Percent"
Selection.NumberFormat = "0.00%"
Range("AC3:AC80").Select
Selection.Style = "Percent"
Selection.NumberFormat = "0.00%"
Range("AA3:AA80").Select
Selection.Style = "Percent"
Selection.NumberFormat = "0.00%"
Range("M3:O80").Select
Selection.Style = "Percent"
Selection.NumberFormat = "0.00%"
Range("I3:J80").Select
Selection.Style = "Percent"
Selection.NumberFormat = "0.00%"

'Deletecells Macro
'
ActiveSheet.Shapes.Range(Array("Rounded Rectangle 1")).Select
Selection.Cut
Range("AJ1").Select
Selection.ClearContents
Range("A1").Select

Dim vntSaveAs
vntSaveAs = Application.GetSaveAsFilename("Sheet1", "Excel File (*.xlsx),*.xlsx")
If TypeName(vntSaveAs) = "Boolean" Then Exit Sub
Sheets("Participation_Lead_Report").Copy
ActiveWorkbook.SaveAs vntSaveAs, xlOpenXMLWorkbook

End Sub


Thank you, A