-
Hi Graham,
I have done my best to integrate your code into mine but unfortunately I have run out of knowledge. You code works well for identifying the path of the target source file and will return a message box contain said path and the macro is enabled. The difficultly I am have is integrating it in to the code I have written (really stolen from the internet and adapted to my needs!). I have pasted this code below to show what I have so far.
Sub Update_Fields()
Dim objExcel As New Excel.Application
Dim exWb As Excel.Workbook
On Error Resume Next
Set exWb = objExcel.Workbooks.Open("C:\Users\a727174\Desktop\ABCDE.xls")
ActiveDocument.TT.Caption = exWb.Sheets("cost summary").Range("E397").Value
exWb.Saved = True
exWb.Close
On Error GoTo 0
Set exWb = Nothing
End Sub
My approach has been to replace the path to file ABCDE with the getfilename field that your function obtains but this is universally returning errors regardless of how I construct it. I feel as though I am close, but clearly lacking the necessary knowledge to get it right. It would be really appreciated if you could give me some pointers.
Many thanks
Steve
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules