K
kalel09
Hi!
I have an excel makro which saves a text file from an marked column.
The Excel File is on a server in the network and so the makro saves
the text file in the same folder where the excel file is (on the
network server)
BUT i want the text file on MY local macintosh Desktop.
4 other Mac Users which read and write in the excel file want the
same.
When User "A" saves the text file, the file should appear on HIS local
mac desktop.
The same with user "B" and so on....
How can i make this?
Here is the script:
Option Explicit
Public Sub Datensatz_schreiben()
Dim strDatensatz1 As String
Dim strDatensatz As String
Dim intDatNum As Integer
Dim intSpalte As Integer
Dim strDatei As String
intSpalte = Cells(ActiveCell.Row,
Columns.Count).End(xlToLeft).Column
strDatei = Cells(ActiveCell.Row, 1) & "_" & Cells(ActiveCell.Row,
2) & "_" & Cells(ActiveCell.Row, 3) & "_" & Cells(ActiveCell.Row, 4) &
".txt"
intDatNum = FreeFile()
Open strDatei For Output Access Write As #intDatNum
strDatensatz1 = Cells(2, 1).Text
strDatensatz = Cells(ActiveCell.Row, 1).Text
For intSpalte = 2 To intSpalte
strDatensatz1 = strDatensatz1 & vbTab & Cells(2,
intSpalte).Text
strDatensatz = strDatensatz & vbTab & Cells(ActiveCell.Row,
intSpalte).Text
Next intSpalte
Print #intDatNum, strDatensatz1
Print #intDatNum, strDatensatz
Close #intDatNum
End Sub
I have an excel makro which saves a text file from an marked column.
The Excel File is on a server in the network and so the makro saves
the text file in the same folder where the excel file is (on the
network server)
BUT i want the text file on MY local macintosh Desktop.
4 other Mac Users which read and write in the excel file want the
same.
When User "A" saves the text file, the file should appear on HIS local
mac desktop.
The same with user "B" and so on....
How can i make this?
Here is the script:
Option Explicit
Public Sub Datensatz_schreiben()
Dim strDatensatz1 As String
Dim strDatensatz As String
Dim intDatNum As Integer
Dim intSpalte As Integer
Dim strDatei As String
intSpalte = Cells(ActiveCell.Row,
Columns.Count).End(xlToLeft).Column
strDatei = Cells(ActiveCell.Row, 1) & "_" & Cells(ActiveCell.Row,
2) & "_" & Cells(ActiveCell.Row, 3) & "_" & Cells(ActiveCell.Row, 4) &
".txt"
intDatNum = FreeFile()
Open strDatei For Output Access Write As #intDatNum
strDatensatz1 = Cells(2, 1).Text
strDatensatz = Cells(ActiveCell.Row, 1).Text
For intSpalte = 2 To intSpalte
strDatensatz1 = strDatensatz1 & vbTab & Cells(2,
intSpalte).Text
strDatensatz = strDatensatz & vbTab & Cells(ActiveCell.Row,
intSpalte).Text
Next intSpalte
Print #intDatNum, strDatensatz1
Print #intDatNum, strDatensatz
Close #intDatNum
End Sub