Hyperlinks help using a cell reference

288enzo

Well-known Member
Joined
Feb 8, 2009
Messages
723
Office Version
  1. 2016
Platform
  1. Windows
My code that is giving me trouble is -
VBA Code:
Range("AA5").Hyperlinks.Add Anchor:=Range("AA5"), Address:="https://webaddress.com/?query=" & G5, TextToDisplay:=G5

I'm getting Run-time error 5: Invalid procedure call or argument.

Essentially, what I'm trying to accomplish is to change all cells in column G to a hyperlink. If I could get the above to work, I was going to simply copy and paste the formula down, copy cells in AA and paste them back into G.
 
Well, my suggestion was there 4 minutes before you figured it out(y).
Thank you for that, but I am still searching the web for help and trying different ideas, and not simply sitting and waiting for someone to respond to my post.

I do appreciate the help, and your idea of using brackets instead of "Range" will save me a few key strokes later on. Always learning new tips and tricks on this site.
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,216,114
Messages
6,128,913
Members
449,478
Latest member
Davenil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top