Hi,
I am relative new to this and would appreciate it a lot if someone helped me out with this code. I have a db which opens an excel sheet.
In one of the cells I would like to insert a hyperlink to another excel sheet.
However I am getting the below error.
Run - time error2147467259 (80004005)
Automation error
Unspecified error
Below is the code I am using
Set appexcel = CreateObject("Excel.Application")
Set wbexcel = appexcel.Workbooks.Open("C:\Documents and Settings\saltir\Desktop\workorder_log.xls")
Set asheet = wbexcel.Sheets("Sheet1")
appexcel.Visible = True
With asheet
.Range("B2").Select
.Hyperlinks.Add Anchor:=Selection, Address:="C:\documents\leave.xls", TextToDisplay:="Leave"
End With
Any help would be greatly appreciated as I've been going around in circles for quite some time now .
Thanks
I am relative new to this and would appreciate it a lot if someone helped me out with this code. I have a db which opens an excel sheet.
In one of the cells I would like to insert a hyperlink to another excel sheet.
However I am getting the below error.
Run - time error2147467259 (80004005)
Automation error
Unspecified error
Below is the code I am using
Set appexcel = CreateObject("Excel.Application")
Set wbexcel = appexcel.Workbooks.Open("C:\Documents and Settings\saltir\Desktop\workorder_log.xls")
Set asheet = wbexcel.Sheets("Sheet1")
appexcel.Visible = True
With asheet
.Range("B2").Select
.Hyperlinks.Add Anchor:=Selection, Address:="C:\documents\leave.xls", TextToDisplay:="Leave"
End With
Any help would be greatly appreciated as I've been going around in circles for quite some time now .
Thanks