Hi Everyone!
I have a workbook i created as an order management system at work. The user form passes data to the sheet. Each PO # has it's own row. I also save a PDF copy of each PO to a folder on my PC. This is a section of my "submit" button code "txtSSPO" is the text box where the PO # is entered. When I submit the user form data, i'd like the PO value (on sheet) to be a hyperlink to the PDF file on my PC. the file names are the PO numbers. and they are all stored in the same folder.
I think I'm close, but it's making me cookoo....Can someone explain what i'm doing wrong here? Thank you for any input you may have to offer!
I have a workbook i created as an order management system at work. The user form passes data to the sheet. Each PO # has it's own row. I also save a PDF copy of each PO to a folder on my PC. This is a section of my "submit" button code "txtSSPO" is the text box where the PO # is entered. When I submit the user form data, i'd like the PO value (on sheet) to be a hyperlink to the PDF file on my PC. the file names are the PO numbers. and they are all stored in the same folder.
Code:
' Write data to worksheet
rowCount = Worksheets("Order Status").Cells(Worksheets("Order Status").Rows.Count, 1).End(xlUp).Row
With Worksheets("Order Status").Range("A1")
.Offset(rowCount, 0).Value = Date
.Offset(rowCount, 1).Value = Me.txtvendor.Value
.Offset(rowCount, 2).Value = Me.txtcust.Value
.Offset(rowCount, 3).Value = Me.txtSSPO.Value[FONT=Menlo, Monaco, Consolas, Courier New, monospace][COLOR=#000000] '[/COLOR][/FONT][COLOR=#000000][FONT=Menlo].Hyperlinks.Add Anchor:= ????[/FONT][/COLOR][COLOR=#000000][FONT=Menlo], _ [/FONT][/COLOR]
[COLOR=#000000][FONT=Menlo]' Address:=[/FONT][/COLOR][COLOR=#A31515][FONT=Menlo]"C:\Users\ME\Desktop\Hub Folder\05-12345-1.pdf"[/FONT][/COLOR][COLOR=#000000][FONT=Menlo], _ [/FONT][/COLOR]
End With
I think I'm close, but it's making me cookoo....Can someone explain what i'm doing wrong here? Thank you for any input you may have to offer!