when run this code
Sub copyfile1()
Dim strName As String
strName = InputBox(Prompt:="What new name do you want for the new file?", Title:="Name of new file", Default:="")
If Len(strName) > 0 Then
FileCopy "C:\test\test.xlsm", "C:\test\" & strName & ".xlsm"
End If
End Sub
+ then run this code after above code... i mean merge both code in once macro file...plz need more help from u
Sub HHHHHHHHHHHHHHH()
'
' HHHHHHHHHHHHHHH Macro
'
'
Dim D As String
Dim nwWbName As String
Worksheets("BAL").Select
Range("B10:G500").Select
Range(Selection, Selection.End(xlDown)).Select
Dim nwWb As Workbook
ActiveSheet.Range("$A$9:$I$500").AutoFilter Field:=9, Criteria1:=">0", _
Operator:=xlAnd
Selection.Copy
nwWbName = Application.GetOpenFilename
If nwWbName = "False" Then
ActiveSheet.Range("$A$9:$I$500").AutoFilter Field:=9
Exit Sub
Else
Workbooks.Open (nwWbName)
End If
Worksheets("ENTRY").Select
Range("B61").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWorkbook.Save
'changed:
MsgBox "finished copying from " & Filename
'or (remove comment char = ' below and add above)
' Mainfile.activate
End Sub
thanx a lot
Bookmarks