Convert Text to Formula

J

jurgenC!

hi all,

looking for assistance on how to convert a text within a cell to a
formula.

i sucessfully created the text for a cell as follow:

C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

now i would like to convert this into a formula so that it reads:

=C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

the piece of code is as follow:

Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 4) = _
"'" & sLocation & "[" &
Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 3) &
"]TestScripts!'E" & iRowS + 2

thanking you in advance for any help and your time.

cheers....


....jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
R

Rob van Gelder

jurgenC!,

Use this in your formula.

Offset(iRowD, iPriority + 4).Formula = "=" & _

Rob
 
J

jC!

hi Rob,

thanks for your time and input, not too sure if i am doing something
incorrectly, but as soon as i add ' .Formula = "="& ' to the
code, i receive the 1004 error (Application-defined or object-defined
error).

all is well if i only add ' .Formula ' to the code, but as
soon i add the equal sign, the error will appear.

cheers...


....jurgenC!
 
R

Rob van Gelder

I suspect there's a syntax error with the formula.

Using the old method, let it write a formula to the cell.
Then manually edit the formula and put an = before the text. See if it
accepts it.

Rob


Rob van Gelder said:
jurgenC!,

Use this in your formula.

Offset(iRowD, iPriority + 4).Formula = "=" & _

Rob

jurgenC! said:
hi all,

looking for assistance on how to convert a text within a cell to a
formula.

i sucessfully created the text for a cell as follow:

C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

now i would like to convert this into a formula so that it reads:

=C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

the piece of code is as follow:

Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 4) = _
"'" & sLocation & "[" &
Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 3) &
"]TestScripts!'E" & iRowS + 2

thanking you in advance for any help and your time.

cheers....


...jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
J

jurgenC!

Hi Rob,

how write you were (the error was between chair and keyboard <smirk>).
the '-symbol was in the incorrect location.

once again a big thank you for your help and time.

cheers....

...jurgenC!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Top