PIsabel
Board Regular
- Joined
- Feb 4, 2014
- Messages
- 121
- Office Version
- 365
- Platform
- Windows
Hello
Is there something missing here?
As it is this code does nothing.
I need the code, with the file open, to change the folder and rename it
Is there something missing here?
As it is this code does nothing.
I need the code, with the file open, to change the folder and rename it
Code:
Sub Savefile()
If ThisWorkbook.Path = "[URL="file://\\Servidor\servidor\ORÇAMENTOS\orç"]\\Servidor\servidor\ORÇAMENTOS\orç[/URL] - A Fazer" Then
With ThisWorkbook
strWbKill = .FullName
.SaveAs "[URL="file://\\Servidor\servidor\ORÇAMENTOS\orç"]\\Servidor\servidor\ORÇAMENTOS\orç[/URL] - A Fazer" & "- Orçamento - profissional - " & Range("e3") & (" - ") & Range("I3") & (" - nº ") & Range("J2") & " - " & Range("E8")
End With
Kill strWbKill
Else
If ThisWorkbook.Path = "[URL="file://\\Servidor\servidor\ORÇAMENTOS\orç"]\\Servidor\servidor\ORÇAMENTOS\orç[/URL] - Vendido" Then
With ThisWorkbook
strWbKill = .FullName
.SaveAs "[URL="file://\\Servidor\servidor\ORÇAMENTOS\orç"]\\Servidor\servidor\ORÇAMENTOS\orç[/URL] - Vendido" & "- Orçamento - profissional - " & Range("e3") & (" - ") & Range("I3") & (" - nº ") & Range("J2") & " - " & Range("E8")
End With
Kill strWbKill
End If
End If
End Sub