Hi Mumps1
Thanks for your reply. I had try the code below your show me.
It shown error msg : Next Without For.
It might be other code is wrong or something. Below is my code in 1 module. Sorry to tell you that i am noob for VB.
Sub SaveScreeningWithNewName()
Dim NewFN As Variant
' Copy Screening to a new workbook
Sheets(Array("Agent-Sea", "Agent-Air", "B.Confirmation", "S.I.", "HBL", "Agent Quotation")).Copy
ActiveSheet.Shapes.Range(Array("Save&Clear")).Delete
NewFN = "\\CYCHUA-PC\Users\Public\Documents\Agent Bill\" & Sheets(1).Range("c2").Value & Sheets(1).Range("D2").Text & " " & Sheets(1).Range("I1").Text & " " & Sheets(1).Range("j2").Text & " " & Sheets(1).Range("k2").Text & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
UncheckAll
End Sub
Sub UncheckAll()
Dim ws As Worksheet
Dim ChkBox As Excel.CheckBox
For Each ws In Sheets
With ws
For Each ChkBox In .CheckBoxes
ChkBox.Value = xlOff
Next ChkBox
Next ws
End With
NextScreening
End Sub
Sub NextScreening()
Sheets("Agent-Sea").Range("C2").Value = Range("C2").Value + 1
Range("I1:L2").ClearContents
Range("C4").ClearContents
Range("B5:L14").ClearContents
Range("d18:l18").ClearContents
Range("d20:G28").ClearContents
Range("d30:G37").ClearContents
End Sub
Other than this uncheck thingy. I face another problem, when i copy the command button from Sheet1 to Sheet2, i thought it would work but it dont....
Bookmarks