Hyperlink

Quadzer

New Member
Joined
Jan 7, 2015
Messages
1
Can anyone tell me why this does not work?

Worksheets("PR Database").Range("C3").Value = "=HYPERLINK("[PR 2015.xlsm]4!A4","test")"

I want to place a Hyperlink in sheet PR Database cell C3 that points to sheet 4 cell A4 and called test

Thanks for any and all help.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi and Welcome to MrExcel,

There's a few syntax errors that keep that from working:
1. Single quotes are needed around a workbook or worksheet reference that includes spaces.

2. Literal quotes in a formula need to be doubled up in VBA expressions.

3. A "#" is needed in a hyperlink expression to reference a range in an open workbook if the full filepath is not specified.

Try....
Code:
 Worksheets("PR Database").Range("C3").Formula = _
   "=HYPERLINK(""#'[PR 2015.xlsm]4'!$A$4"", ""test"")"
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
Members
449,075
Latest member
staticfluids

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