Formatting an Excel column as a hyperlink

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
 
P

Pete D.

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

Bill Murphy

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
 
G

Guest

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
 
B

Bill Murphy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top