Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RacerChris

    Passing Relative Named Variables in VBA

    Skip, Thanks for the tip. That may be a good alternative. I guess I should abandon using Named references that are relative. It seems they don't work in VBA. Do you agree?
  2. RacerChris

    Passing Relative Named Variables in VBA

    SKIP - "How would it return an error? " If I use the Cells command with a specific Column Number, then if a column is inserted into the spreadsheet, then won't the Cells command not be updated and therefore reference the wrong cell? SKIP - "AVOID the Select and Activate methods as much as...
  3. RacerChris

    Passing Relative Named Variables in VBA

    Guys, One other thing. Although Skip's method, ie, using Cells works, I'd rather not use it, since it could result in an error if a Column is inserted in the spreadsheet. I'd rather use relative references, so the VBA code works even if the spreadsheet is modified...
  4. RacerChris

    Passing Relative Named Variables in VBA

    Thanks guys for the reply and assistance. Hopefully this will help you folks understand the problem better. COMBO: "When you define/view it, the address is relative to active cell. The same is in vba, to take the full advantage you need to change selection while looping." I tried this, but...
  5. RacerChris

    Passing Relative Named Variables in VBA

    This is what the spreadsheet currently does: The current spreadsheet is for structural calculations. Both input items and calcuated cells are done in the same row. This allows doing the same calc with different inputs simply by copying the row over and over. The calcs refer to both inputs...
  6. RacerChris

    Passing Relative Named Variables in VBA

    Skip, I am using Excel 2007. And Yes SD is a named range. Again, works fine if absolute, but defaults to Row 1 if relative. Not sure how to paste in the Named Ranges, but SD refers to Calcs!$r$3 AWR refers to Calcs!$AO11 Thanks again!
  7. RacerChris

    Passing Relative Named Variables in VBA

    AreaWR = Range("Ao39") 'WORKS AreaWR = Range("SD") 'Works AreaWR = Range("AWR") 'Works only on Line 1 Thanks for the reply. The first and second works fine. The difference is that the first one use relative reference while the second absolute. The third one seems to select the right...
  8. RacerChris

    Passing Relative Named Variables in VBA

    *** Newbie Warning *** I have an application that uses Named Variables with relative references. In other words, I use a rows to do computations that reference other columns in the row for values. The value in these cells changes depending on which row it is being calculated in. I want to...

Part and Inventory Search

Back
Top