The the following VBA code
works fine. Thereafter I have named "nQ" the range "F21" and tried:VB Code:
Private Sub ComboBox1_Change() Sheets("Calcs").Range("F21").Value = ComboBox1.ListIndex End Sub
and it gives error 1004.VB Code:
Private Sub ComboBox1_Change() Range(ThisWorkbook.Names("nQ")).FormulaR1C1 = Trim(ComboBox1.ListIndex) End Sub
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?




Reply With Quote