Results 1 to 3 of 3

Thread: Named range referred to from a different sheet [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Question Named range referred to from a different sheet [RESOLVED]

    The the following VBA code
    VB Code:
    1. Private Sub ComboBox1_Change()
    2.     Sheets("Calcs").Range("F21").Value = ComboBox1.ListIndex
    3. End Sub
    works fine. Thereafter I have named "nQ" the range "F21" and tried:
    VB Code:
    1. Private Sub ComboBox1_Change()
    2.     Range(ThisWorkbook.Names("nQ")).FormulaR1C1 = Trim(ComboBox1.ListIndex)
    3. 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?
    Last edited by krtxmrtz; Jun 28th, 2006 at 06:35 AM.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width