View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Stefanie[_2_] Stefanie[_2_] is offline
external usenet poster
 
Posts: 3
Default Why cant I get the path to the sharepoint library????????

What's interesting is that this sort of works - but I'm creating the
doc twice. When I get the Save As dialog - the document already
exists:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If SaveAsUI Then
Sheets("Purchase
Order").Range("Description,VendorInfo,QUANTITY1,PR ODUCT1,ITEM1,PRICE1,submitter,ShipVia,Terms,MACRO_ ALERT").Interior.ColorIndex
= xlColorIndexNone
Sheets("Purchase Order").Range("Location").Interior.Color =
RGB(184, 204, 228)
Sheets("Purchase Order").Range("MACRO_ALERT").Value = ""
SaveByDate
End If
End Sub

Sub SaveByDate()
Dim MyFileName As String
Dim MyFilePath As String
MyFilePath = "http://server/dept/purchasetracking/"
MyFileName = "PO_" & Format(Now(), "yyyymmdd-hhnnss")
ActiveWorkbook.SaveAs Filename:=MyFilePath & MyFileName,
FileFormat:=52
End Sub