Export field value to excel cell

jbush

New Member
Joined
Jul 12, 2013
Messages
3
Hello. This is my fist posting on this forum, and first posting on any forum for that matter. I have been trying for some time to export the value in my access field into an excel cell. The user will dblclick a hyperlink, which will open the corresponding file, as well open an excel template. Here is where I'm stuck. I need the code to take the hyperlink(path and filename), and stick it in an excel cell. This is what I have so far.
------------------------------------------
Private Sub DEMOS_NAME_DblClick(Cancel As Integer)

Dim LinkStr As String


LinkStr = [DEMOS NAME]
Application.FollowHyperlink LinkStr


Dim ObjXLApp As Object
Dim ObjXLBook As EXCEL.Workbook
Dim OSheet As EXCEL.Worksheet
Set ObjXLApp = CreateObject("Excel.Application")
Set ObjXLBook = ObjXLApp.Workbooks.Open("z:\upload\UPLOAD TEMPLATEv5.xls")
Set OSheet = ObjXLBook.Worksheets("Demo and Coding Entry")
ObjXLApp.Visible = True






Set d = CurrentDb()
Set r = d.OpenRecordset("PROCESSING")
Set fvalue = r.Fields("DEMOS NAME")






OSheet.Cells(2, 3) = fvalue

End Sub
-------------------------------------------------------------

If I put fvalue in quotes, it will transfer the text over, but i need the actual value of the hyperlink. And i do not need it to transfer as a link. Any help would be much appreciated.
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

xenou

MrExcel MVP, Moderator
Joined
Mar 2, 2007
Messages
16,644
Office Version
2013
Platform
Windows
What do you mean by "the value of the hyperlink"? Is that a file, a file name, some other caption, the address of the file, or what?
 

Watch MrExcel Video

Forum statistics

Threads
1,098,858
Messages
5,465,104
Members
406,412
Latest member
superjoejoe

This Week's Hot Topics

Top