Results 1 to 24 of 24

Object Variable Not Set

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Object Variable Not Set

    I’m sure this is a relatively simple fix, but I’m unable to find the answer.
    This code is part of a routine that copies and pastes from “CASH RECEIPTS” sheet to “YEARLY TOTALS” sheet in the same workbook.
    rngCash is assigned as a Range variable .
    In the various fixes I’ve tried, the code worked to varying degrees. Now I’m confused.
    Any help would be appreciated.
                          'Assigns the variable "rngCash" to the first non-empty cell in "B1"
                              With ThisWorkbook
                                .Sheets(4).Select
    
                               ‘Object variable or With block variable not set : Variant/Integer’
                               Set rngCash = DestSh.Range("B1").End(xlDown).Offset(1, 0)
                                    rngCash.Select
                               
                               rngCash(0, 1).Value = Dcell.Value
                                rngCash(0, 2).Value = "Cash"
                                rngCash(0, 3).Value = "   ----------"
                                rngCash(0, 4).Value = Rcell.Value
                                rngCash(0, 5).Value = "   ---
                                rngCash(0, 6).Value = Abbrev
                                rngCash(0, 7).Value = "   ---"
                               
                             End With
    There is a workbook attached for reference
    The Macro is “LoopHell”

    Thanks
    Attached Files Attached Files
    Last edited by max57; 01-03-2010 at 01:43 PM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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