daniels012
Well-known Member
- Joined
- Jan 13, 2005
- Messages
- 5,219
Here is the code I am using now:
After the code chooses the case and saves the name it's not closing this new form?
The code works fine it just won't close after the change is made.
Thank You
Michael
Code:
Dim Path As String, Path2 As String, CurrPath As String
Application.ScreenUpdating = False
ActiveWorkbook.Save
CurrPath = ActiveWorkbook.Path
Path = "C:\Documents and Settings\Owner\My Documents\Completed Proposals\"
Path2 = "C:\Documents and Settings\Owner\My Documents\Surface Systems\"
On Error Resume Next
ActiveWorkbook.SaveAs Filename:= _
Path & "Proposal" & _
Str(Application.Range("O3").Value), FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
On Error GoTo 0
new_file = ActiveWorkbook.Name
Range("F2").Select
Workbooks.Open Filename:=Path2 & "Proposal for XL.xls"
Workbooks(new_file).Save
Select Case Workbooks(new_file).Sheets("FRONT").Range("C2").Value
Case "MD"
Workbooks(new_file).SaveAs Filename:= _
"\\MIKESRGATEWAY\MikesProposals\" & Str(Application.Range("c3").Value) & new_file, FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Case "TD"
Workbooks(new_file).SaveAs Filename:= _
"\\Tomsblackibm\shareddocs\TomsProposals\" & Str(Application.Range("c3").Value) & new_file, FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End Select
Workbooks(new_file).Close
ChDir CurrPath
Application.ScreenUpdating = True
End Sub
After the code chooses the case and saves the name it's not closing this new form?
The code works fine it just won't close after the change is made.
Thank You
Michael