HI,
I have tried looking at all the examples of how to create a formula in VBA that has the worksheet defined as a variable that I can easily change for each report I need.
I don't know how to define this at the top of my module.
Range("B486").Select
ActiveCell.FormulaR1C1 = _"=IF('2012master'!R[-483]C[82]="""","""",VLOOKUP(""Y"",'2012master'!R[-483]C[82]:R[-483]C108,24,FALSE))"
I am looking for something at the top similar to:
set ws = '2012master'
so that all the formulas on the vba will use the workshee that I define.
Secondly, I wanted to make the process easier for the user so that they could choose the worksheet from a user form to populate the specific worksheet being used for the variable if this is possible.
Thank you in advance.
I have tried looking at all the examples of how to create a formula in VBA that has the worksheet defined as a variable that I can easily change for each report I need.
I don't know how to define this at the top of my module.
Range("B486").Select
ActiveCell.FormulaR1C1 = _"=IF('2012master'!R[-483]C[82]="""","""",VLOOKUP(""Y"",'2012master'!R[-483]C[82]:R[-483]C108,24,FALSE))"
I am looking for something at the top similar to:
set ws = '2012master'
so that all the formulas on the vba will use the workshee that I define.
Secondly, I wanted to make the process easier for the user so that they could choose the worksheet from a user form to populate the specific worksheet being used for the variable if this is possible.
Thank you in advance.