Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
hyperlink creation problem
I'm new and I'm experiencing a few problems. Here is the code:
Sub makelink() Dim Cell As Range For Each Cell In Intersect(Selection, ActiveSheet.UsedRange) If Cell < "" Then Dim sLinkAddress As String sLinkAddress = "http://www.google.com/search?&q=" & Cell.Value ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=sLinkAddress End If Next End Sub Problem 1 is that if I select multiple cells, the Cell.Value of the last cell is used for all of them. Problem 2 is that if Cell.Value contains a space, it breaks with an error 400. (maybe the code should convert spaces to plus sign) Problem 3 is that i need Cell.Value in quotes and adding & Chr(34) before and after Cell.Value doesnt work. I know about the hyperlink function but I want a macro so I can store the search string and call it easily. Thank you! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
hyperlink creation problem
Update: Solved problem 3
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hyperlink creation problem | Excel Programming | |||
Hyperlink creation problem | Excel Programming | |||
Automating hyperlink creation | Excel Worksheet Functions | |||
entering emails without hyperlink creation | Excel Discussion (Misc queries) | |||
Hyperlink Creation in Excel X for Mac | Excel Worksheet Functions |