Hi there.
I can't seem to find anything on google (I might be phrasing my question wrong). So I'll try my luck here.
I have a code, where I create a txt file on the desktop. Right now it looks like this:
Sub Print()
Dim c As Range, r As Range
Dim output As String
For Each r in Range("A1:A393").Rows
For Each c In r.Cells
output = output & c.Value
Next c
output = output & vbNewLine
Next r
Open "c:\users\"user name"\desktop\qpcrtest.txt" For Output As #1
Print #1, output
Close #1
End sub
This code creates the textfile qpcrtest.txt on the specific users desktop (at the moment my own desktop, since I'm writing the code). Is it possible to create it on the current users desktop?
I don't want it on the public desktop, since the file created will only be used by the current user and will be moved or deleted shortly after.
Bookmarks