Pulling Data from another cell; Linking to a cell macor

imogul

New Member
Joined
Apr 21, 2011
Messages
14
Hi, I'm writing a macro that will pull a data from different reports. Normally I would just link the cells but the cells I need change. I have a formula that I can use the value from as a relative reference to tell me what cell the data is in, but I don't know how to add the link in VBA. I'm thinking something like this (ignoring the relative refernce part for now) :
Code:
Hyperlinks.Add Anchor:=.Range("A5"), _
Address:="u:\[Test Page, New report creation.xlsx]", _
SubAddress=range("A5")
but that doesn't work. Basically I need to know the code to link a cell from my active sheet to a another sheet that I know the name and location of.

Thanks!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,215,826
Messages
6,127,122
Members
449,361
Latest member
VBquery757

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