ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Easy VBA question (https://www.excelbanter.com/excel-discussion-misc-queries/153072-easy-vba-question.html)

Dallman Ross

Easy VBA question
 

I want to save a cell's formula for later replacement after
I temporarily change the cell content in the macro. I can't
figure out how to save a formula to a var. I can save the value
just fine, but that's not what I want. I know this is basic,
but it's eluding me.

--
dman

JMB

Easy VBA question
 
try:
strFormula = Range("A1").Formula

"Dallman Ross" wrote:


I want to save a cell's formula for later replacement after
I temporarily change the cell content in the macro. I can't
figure out how to save a formula to a var. I can save the value
just fine, but that's not what I want. I know this is basic,
but it's eluding me.

--
dman


JMB

Easy VBA question
 
where strFormula is dimmed as a string.


"Dallman Ross" wrote:


I want to save a cell's formula for later replacement after
I temporarily change the cell content in the macro. I can't
figure out how to save a formula to a var. I can save the value
just fine, but that's not what I want. I know this is basic,
but it's eluding me.

--
dman



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

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