Try putting the subaddress into the listbox. The display name of the
hyperlink (what you see on the spreadsheet) and the URL address are tow
different properties of a cell.
Sub test()
Set a = Range("C7")
MsgBox a.Hyperlinks.Item(1).SubAddress
End Sub
The form that these list boxes on are not on a spreadsheet. I wanted this
workbook to look like an application.
> Try putting the subaddress into the listbox. The display name of the
> hyperlink (what you see on the spreadsheet) and the URL address are tow
[quoted text clipped - 8 lines]
> > contained data that was hyperlinked (to external sources). When they are in
> > the list box the hyperlinks diappear. I want to keep this feature. Any ideas?
Joel - 29 Sep 2007 12:29 GMT
I think you just want the text in the Listbox to be colored and underlined.
the hyperlink on the worksheet are blue and underlined that why they look the
way they do. When the item in the listlox is selected you can perform the
hyperlink actions in VBA code.
You can color the items in a Listbox with the following statement
UserForm1.ListBox1.ForeColor = vbBlue
I have excel 2003 and was not able to underline the text in the Listbox.
Not sure if it is possible.
> The form that these list boxes on are not on a spreadsheet. I wanted this
> workbook to look like an application.
[quoted text clipped - 11 lines]
> > > contained data that was hyperlinked (to external sources). When they are in
> > > the list box the hyperlinks diappear. I want to keep this feature. Any ideas?