Named range referred to from a different sheet [RESOLVED]
The the following VBA code
VB Code:
Private Sub ComboBox1_Change()
Sheets("Calcs").Range("F21").Value = ComboBox1.ListIndex
End Sub
works fine. Thereafter I have named "nQ" the range "F21" and tried:
VB Code:
Private Sub ComboBox1_Change()
Range(ThisWorkbook.Names("nQ")).FormulaR1C1 = Trim(ComboBox1.ListIndex)
End Sub
and it gives error 1004.
ComboBox1 and range nQ are in different sheets. But if I redefine nQ to be a cell in the same sheet as the combo then it works. So, how do I have to go about this?
Re: Named range referred to from a different sheet
Re: Named range referred to from a different sheet [HELP!]
Finally this has worked:
Application.Range("nQ").Value = ComboBox1.ListIndex