Am having some difficulty overcoming a problem saving file update info to a sharepoint location.
Essentially, active workbook when an update button is clicked on it sends User Name, File Name and Date & Time to a tracker workbook. Had this working on a prior version not in sharepoint. Assistance with the code would be seriously appreciated.
Sub btnUpdate_Click()
Application.ScreenUpdating = False
Dim fileSys As Object
Dim txtStream As Object
Dim logFile As String
logFile = "http:\\vr6tpt09\depts\Action Assessment\Action Tracker 2010.csv"
Set fileSys = CreateObject("scripting.filesystemobject")
Set txtStream = fileSys.OpenTextFile(Filename:=logFile, iomode:=8, Create:=True, Format:=-2)
txtStream.WriteLine (ActiveWorkbook.Name & "," & Format(Now(), "mm/dd/yyyy") & "," & Format(Now(), "HH:MM") & "," & Application.UserName)
Workbooks.Open Filename:="http:\\vr6tpt09\depts\Action Assessment\Action Tracker 2010.csv"""
Range("A1
2245").Select
Selection.Copy
Workbooks.Open Filename:="http:\\vr6tpt09\depts\Action Assessment\Action Tracker 2010.csv"
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWorkbook.Close
ActiveWorkbook.Close
Application.ScreenUpdating = False
End Sub
Essentially, active workbook when an update button is clicked on it sends User Name, File Name and Date & Time to a tracker workbook. Had this working on a prior version not in sharepoint. Assistance with the code would be seriously appreciated.
Sub btnUpdate_Click()
Application.ScreenUpdating = False
Dim fileSys As Object
Dim txtStream As Object
Dim logFile As String
logFile = "http:\\vr6tpt09\depts\Action Assessment\Action Tracker 2010.csv"
Set fileSys = CreateObject("scripting.filesystemobject")
Set txtStream = fileSys.OpenTextFile(Filename:=logFile, iomode:=8, Create:=True, Format:=-2)
txtStream.WriteLine (ActiveWorkbook.Name & "," & Format(Now(), "mm/dd/yyyy") & "," & Format(Now(), "HH:MM") & "," & Application.UserName)
Workbooks.Open Filename:="http:\\vr6tpt09\depts\Action Assessment\Action Tracker 2010.csv"""
Range("A1
Selection.Copy
Workbooks.Open Filename:="http:\\vr6tpt09\depts\Action Assessment\Action Tracker 2010.csv"
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWorkbook.Close
ActiveWorkbook.Close
Application.ScreenUpdating = False
End Sub