I can create a text file from data entered into a UserForm. However, I would then like to copy or export the file to a directory in a server I have on the web.
I've tried various code snippets from searching on the web without luck.
The following brings up errors "Bad file name or number" or "Path not found".
Sub test()
Dim SourceFile, DestinationFile
SourceFile = "d:\Users\Ted\Desktop\test.txt"
DestinationFile = "//website.ca/Folder/test.txt"
FileCopy SourceFile, DestinationFile
End Sub
Also tried DestinationFile = "http://website.ca/Folder/test.txt"
DestinationFile = "http:\\website.ca\Folder\test.txt"
DestinationFile = "\\website.ca\Folder\test.txt"
Appreciate any pointers.
Thanks
Bookmarks