wie kann ich in folgendem Code festlegen, dass der Speicherort ein bestimmter Ordner ist und der Dateiname statt wie hier angegeben der User-Login aus Environ ist ?
Beispiel: User-Login = "abcd", dann Dateiname = abcd.xls
Kann mir jemand helfen ?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim strDatei As String, strText As String
Dim intFile As Integer, rng As Range
Const strDELIM As String = "|"
intFile = FreeFile
With ThisWorkbook
strDatei = .Path & "\SearchLog" & Replace(.Name, ".xlsm", "") & ".xls"
End With
Open strDatei For Append As #intFile
If LOF(intFile) = 0 Then
strText = "Search Terms:"
Print #intFile, strText
End If
If Range("G7") mstrOld Then
strText = _
Range("G7")
Print #intFile, strText
End If
Close #intFile
End Sub
VG und vielen Dank im Voraus, Tim