I am new to VBA and have created the following code to create a file name. How do I add code to save to the following SP library?
Code to save:
Option Explicit
Sub SvMe()
'Saves filename as value of A1 plus the current date
Dim newFile As String, fName As String
' Don't use "/" in date, invalid syntax
fName = Range("g18").Value
'Change the date format to whatever you'd like, but make sure it's in quotes
newFile = fName & " " & Format$(Date, "mm-dd-yyyy")
End Sub
Desired Location:
http://yard/operations/Shared Documents/Sales Estimates/Fracturing
Please Help!!
<!-- / message -->
Code to save:
Option Explicit
Sub SvMe()
'Saves filename as value of A1 plus the current date
Dim newFile As String, fName As String
' Don't use "/" in date, invalid syntax
fName = Range("g18").Value
'Change the date format to whatever you'd like, but make sure it's in quotes
newFile = fName & " " & Format$(Date, "mm-dd-yyyy")
End Sub
Desired Location:
http://yard/operations/Shared Documents/Sales Estimates/Fracturing
Please Help!!
<!-- / message -->