D
Damien
Hi all,
I need to be able to save the active workbook by including the name which
appears in a combo box on the users sheet into the file Path/Name. I can save
the file by having a complete Path/Name but need to be able to concatenate
the selection with the given path.
The following code returns an 'object required' error.
Can anyone help? D
Sub SaveFile()
Dim fs As Object
Dim strFile As String
Dim strNewFile As String
Dim FilePath As String
Set FilePath = ("\\Blah Blah Blah\")
strFile = ThisWorkbook.Name
strNewFile = "\\Blah Blah Blah\" & cboxProjectList.Value & "\.xls"
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile strFile, strNewFile
MsgBox "Your file has been saved"
End Sub
I need to be able to save the active workbook by including the name which
appears in a combo box on the users sheet into the file Path/Name. I can save
the file by having a complete Path/Name but need to be able to concatenate
the selection with the given path.
The following code returns an 'object required' error.
Can anyone help? D
Sub SaveFile()
Dim fs As Object
Dim strFile As String
Dim strNewFile As String
Dim FilePath As String
Set FilePath = ("\\Blah Blah Blah\")
strFile = ThisWorkbook.Name
strNewFile = "\\Blah Blah Blah\" & cboxProjectList.Value & "\.xls"
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile strFile, strNewFile
MsgBox "Your file has been saved"
End Sub