ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to substitute value of stringvariable to ActiveCell.FormulaR1C (https://www.excelbanter.com/excel-programming/394411-how-substitute-value-stringvariable-activecell-formular1c.html)

robo

How to substitute value of stringvariable to ActiveCell.FormulaR1C
 
Hello,

I have built a stringvariable in VBA with a VLOOKUP formula in it (the
tablearray refers to another file that has been input by a GetOpenFilename).
The ActiveCell.FormulaR1C1 = strFormula does not seem to work. How do I get
this
stringvariable substituted in the ActiveCell.FormulaR1C1 = ?
Thanks for your help and suggestions.

Ron

Michael

How to substitute value of stringvariable to ActiveCell.FormulaR1C
 
First, you have to confirm that the string you are passing to the variable
"strFormula"
has the proper sintax. Try displaying it using:
Msgbox(strFormula ) and verify sintax. You may want to post a larger portion
of your code in order to get a better feel of what may be causing the issue.


Michael Arch.


"RoBo" wrote:

Hello,

I have built a stringvariable in VBA with a VLOOKUP formula in it (the
tablearray refers to another file that has been input by a GetOpenFilename).
The ActiveCell.FormulaR1C1 = strFormula does not seem to work. How do I get
this
stringvariable substituted in the ActiveCell.FormulaR1C1 = ?
Thanks for your help and suggestions.

Ron



All times are GMT +1. The time now is 02:29 PM.

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