Formatting an Excel column as a hyperlink

  • Thread starter Thread starter Bill Murphy
  • Start date Start date
B

Bill Murphy

In my application I create and format Excel files using Excel automation.
Is there a way to format a column in a spreadsheet as a hyperlink using
Visual Basic? For example if a column contains the text
j:\images\myimage.tif, can this be formatted as a hyperlink when the Excel
file is being created and formatted?

Bill
 
Yes, but ask this question in an excel news group, they can give you the
best way to do it.
 
Pete,

I forgot to mention that I'm creating the Excel spreadsheets using VBA
inside of my Access application, so that's why I'm asking it here. I'll
also try the Excel newsgroup as you suggested.

Bill
 
Hi Bill,

I've done what you're asking in this way

Set ExcelSheet = CreateObject("Excel.Sheet")
ExcelSheet.Application.Cells(2, 2).Select
ExcelSheet.Application.ActiveSheet.Hyperlinks.Add
ExcelSheet.Application.Cells(2, 2), Address:="j:\images\myimage.tif"

HTH Paolo
 
Thanks Paolo,

Bill

Paolo said:
Hi Bill,

I've done what you're asking in this way

Set ExcelSheet = CreateObject("Excel.Sheet")
ExcelSheet.Application.Cells(2, 2).Select
ExcelSheet.Application.ActiveSheet.Hyperlinks.Add
ExcelSheet.Application.Cells(2, 2), Address:="j:\images\myimage.tif"

HTH Paolo
 
Back
Top