I have an order form in excel that needs to be exported to a tab delineated text file to be uploaded to our suppliers web page.
The excel workbook has three pages for three corresponding days, and we need to export only two columns of data from a single page at a time.
Currently we are using a convoluted method involving a hyperlink which exports the data to access, then saves it as another excel file, and then we manually convert over to the tab delineated text file.
Most of my coworkers are very tech illiterate, and many of them have issues with the multiple steps involved.
I am looking for a visual basic method to replace the multiple steps with a single button on each page that exports the data to the proper format, adding a step that opens a hyperlink to the suppliers webpage - one step click and done.
I have extremely limited experience with VB, and would appreciate some help.
This is what I have so far, but it keeps erroring out on the paste step:
Range("M1:N300").Select
Selection.Copy
Workbooks.Open Filename:="C:\Users\name\Desktop\upload.xlsx"
Windows("upload.xlsx").Activate
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = True
ActiveWorkbook.Save
ActiveWorkbook.SaveAs Filename:="C:\Users\name\Desktop\upload.txt", _
FileFormat:=xlText, CreateBackup:=False
Windows("1302 Supplier Order Form.xlsm").Activate
Range("A3").Select
Workbooks("upload.xlsx").Close SaveChanges:=True