Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula string OK, formula not OK
Please, anybody, donīt you know why this does not work for me?
ActiveCell.formula = "=hyperlink(" & """" & "#'" & Sheets(1).Name & "'!D" & "1" & """" & ";" & """" & Sheets(1).Name & """" & ")" Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula string OK, formula not OK
This works for me
ActiveCell.Formula = "=HYPERLINK(""#" & Sheets(1).Name & _ "!D1"";""" & Sheets(1).Name & """)" -- HTH RP (remove nothere from the email address if mailing direct) "Roman" wrote in message oups.com... Please, anybody, donīt you know why this does not work for me? ActiveCell.formula = "=hyperlink(" & """" & "#'" & Sheets(1).Name & "'!D" & "1" & """" & ";" & """" & Sheets(1).Name & """" & ")" Thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula string OK, formula not OK
Does not for me... shhh... But thank you anyway.
I am always geeting 'Application defined or object defined error' Any idea? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula string OK, formula not OK
When I do this:
activecell.value = "HYPERLINK(""#" & Sheets(1).Name & _ "!D1"";""" & Sheets(1).Name & """)" and then manually replace "hyper" by "=hyper" it works... When I do the same progrmatically I get 'The formula you typed contain error' Very confused. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula string OK, formula not OK
I replaced the comma in my working solution with a ; as you had originally
used that, I assumed that was your setting. Perhaps you need comma also, try ActiveCell.Formula = "=HYPERLINK(""#" & Sheets(1).Name & _ "!D1"",""" & Sheets(1).Name & """)" -- HTH RP (remove nothere from the email address if mailing direct) "Roman" wrote in message oups.com... Does not for me... shhh... But thank you anyway. I am always geeting 'Application defined or object defined error' Any idea? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula string OK, formula not OK
That is it! Thank you much.
Now I see, that when using VBA to create formula I have to put comma instead ; which I use when inserting worksheet function manually Thanks again. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula string OK, formula not OK
Of course, even if you are using a setting, VBA works in US format, so you
put a comma, and it will automatically translate to your settings. -- HTH RP (remove nothere from the email address if mailing direct) "Roman" wrote in message ups.com... That is it! Thank you much. Now I see, that when using VBA to create formula I have to put comma instead ; which I use when inserting worksheet function manually Thanks again. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formula string OK, formula not OK
If your worksheet has a space in it, then you might want:
ActiveCell.Formula = "=HYPERLINK(""#" & "'" & Sheets(1).Name & "'" & _ "!D1"",""" & Sheets(1).Name & """)" Those apostrophes won't hurt if they're not needed, but may be required. Roman wrote: That is it! Thank you much. Now I see, that when using VBA to create formula I have to put comma instead ; which I use when inserting worksheet function manually Thanks again. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
String Formula | Excel Worksheet Functions | |||
IF formula string | Excel Worksheet Functions | |||
Converting a Formula stored as String to real Formula | Excel Worksheet Functions | |||
Formula to Replace or eliminate any sheetname(s) in formula string | Excel Discussion (Misc queries) | |||
Create a formula into a String then assign string to a cell | Excel Programming |