+ Reply to Thread
Results 1 to 10 of 10

variable fill range

Hybrid View

Hammer_757 variable fill range 10-05-2006, 09:07 AM
theDude Inserting named formulas in... 10-06-2006, 07:48 PM
Hammer_757 thanks Dude, ill be trying... 10-07-2006, 03:51 PM
Hammer_757 Dude, I get a runtime error... 10-08-2006, 10:04 PM
theDude Correction to code 10-09-2006, 12:52 PM
Hammer_757 thanks Dude, but now I get a"... 10-09-2006, 01:57 PM
Hammer_757 Actualy that was a problem... 10-09-2006, 02:10 PM
Hammer_757 I still have the problem... 10-09-2006, 02:43 PM
theDude Replace this line of code: ... 10-09-2006, 05:57 PM
Hammer_757 yes, it works. Thanks for... 10-10-2006, 10:05 AM
  1. #1
    Forum Contributor
    Join Date
    03-21-2004
    Location
    Norwich, CT USA
    MS-Off Ver
    Excel 2010
    Posts
    163
    I still have the problem (Application-defined or object-defined error. at:
    rowCount = ActiveSheet.Range(name2).Value)
    However, “Range” comes from a different worksheet, “BinSize”. (“Range” IS a global named range)
    If worksheet "BinSize" is selected in excel and the code is ran, it works fine. If the correct worksheet, Htestc, is selected the error occurs.

    I tried changing the line to:
    rowCount = ActiveWorkbook.Range(name2).Value
    and get: “Object doesn't support this property or method (Error 438)”
    Im getting beat up by somethin that seems pretty simple

  2. #2
    Forum Contributor
    Join Date
    11-16-2004
    Posts
    282
    Replace this line of code:
    rowCount = ActiveSheet.Range(name2).Value
    with this line of code:
    rowCount = ActiveWorkbook.Worksheets("BinSize").Range(name2).Value
    Replace this line of code:
    varRange = ActiveSheet.Cells(37, 1).Address & ":" & Cells((37 + Range(name2).Value), 1).Address
    with this line of code:
    varRange = ActiveSheet.Cells(37, 1).Address & ":" & Cells((37 + RowCount), 1).Address
    Hope this helps,
    theDude

  3. #3
    Forum Contributor
    Join Date
    03-21-2004
    Location
    Norwich, CT USA
    MS-Off Ver
    Excel 2010
    Posts
    163
    yes, it works.
    Thanks for the help and education!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1