F
Frank H
Can anybody assist ?
I am updating an XL file from within an MS-Access (2003) form.
I am using code like the example below... it works 100%
I now need to add a hyperlink to one of the cells.
Can anybody advise how I select the appropriate cell and add a hyperlink
with both an address and text to display ?
TIA Frank
Code.....
Set objXL = New Excel.Application
With objXL
Set objWkb = .Workbooks.Open(XLTemplate)
'Sheet 1
Set objSht = .ActiveWorkbook.Worksheets("1. ABC")
With objSht
.Cells(3, 2).Value = "aaaaa"
.Cells(9, 2).Value = "bbb"
.Cells(4, 2).Value = "ccc"
etc
End With
'Sheet 2
Set objSht = .ActiveWorkbook.Worksheets("2. DEF")
With objSht
.Cells(6, 4).Value = "C"
etc
End With
objXL.ActiveWorkbook.SaveAs XLFile
End With
objXL.Quit
Set objXL = Nothing
Set objSht = Nothing
Set objWkb = Nothing
I am updating an XL file from within an MS-Access (2003) form.
I am using code like the example below... it works 100%
I now need to add a hyperlink to one of the cells.
Can anybody advise how I select the appropriate cell and add a hyperlink
with both an address and text to display ?
TIA Frank
Code.....
Set objXL = New Excel.Application
With objXL
Set objWkb = .Workbooks.Open(XLTemplate)
'Sheet 1
Set objSht = .ActiveWorkbook.Worksheets("1. ABC")
With objSht
.Cells(3, 2).Value = "aaaaa"
.Cells(9, 2).Value = "bbb"
.Cells(4, 2).Value = "ccc"
etc
End With
'Sheet 2
Set objSht = .ActiveWorkbook.Worksheets("2. DEF")
With objSht
.Cells(6, 4).Value = "C"
etc
End With
objXL.ActiveWorkbook.SaveAs XLFile
End With
objXL.Quit
Set objXL = Nothing
Set objSht = Nothing
Set objWkb = Nothing