ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Quotes in .formula calcs (https://www.excelbanter.com/excel-programming/354658-quotes-formula-calcs.html)

Paulymon

Quotes in .formula calcs
 
I would like to put:

HLRange.Formula = "=Hyperlink('file:\\Server1\test.pdf')"

in code but I get a run time error-1004 message, can someone help with the
formatting on this.





Dave Peterson

Quotes in .formula calcs
 
HLRange.Formula = "=Hyperlink(""file:\\Server1\test.pdf"")"

You have to double up your double quotes inside that string.

Paulymon wrote:

I would like to put:

HLRange.Formula = "=Hyperlink('file:\\Server1\test.pdf')"

in code but I get a run time error-1004 message, can someone help with the
formatting on this.


--

Dave Peterson


All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com