ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   activecell.formulaR1C1 = "='i'!R10C6" 'i is a variable (https://www.excelbanter.com/excel-programming/421570-activecell-formular1c1-%3D-%3Di-r10c6-i-variable.html)

Mahi

activecell.formulaR1C1 = "='i'!R10C6" 'i is a variable
 
i cant get the following line working in my VBA programme
please hep me
activecell.formulaR1C1 = "='i'!R10C6"
where i is a variable referencing the sheet index number of all previous
sheets
thank you
Mahi

Mike

activecell.formulaR1C1 = "='i'!R10C6" 'i is a variable
 
ActiveCell.FormulaR1C1 = "='" & i & "'!R10C6"

"Mahi" wrote:

i cant get the following line working in my VBA programme
please hep me
activecell.formulaR1C1 = "='i'!R10C6"
where i is a variable referencing the sheet index number of all previous
sheets
thank you
Mahi


Dave Peterson

activecell.formulaR1C1 = "='i'!R10C6" 'i is a variable
 
I don't understand what i represents ("the sheet index number of all previous
sheets" confuses me).

But maybe:

dim i as long
activecell.formular1c1 = "'" & worksheets(i).name & "'!r10c6"



Mahi wrote:

i cant get the following line working in my VBA programme
please hep me
activecell.formulaR1C1 = "='i'!R10C6"
where i is a variable referencing the sheet index number of all previous
sheets
thank you
Mahi


--

Dave Peterson


All times are GMT +1. The time now is 08:45 AM.

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