+ Reply to Thread
Results 1 to 6 of 6

Utilize a Select Case Statement in Target Intersect Statement

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

    Wink Utilize a Select Case Statement in Target Intersect Statement

    Hello,

    I am currently using an Intersect statement in a worksheet module to perform two things:
    1. Insert a time stamp into row 2 when row 1 has a price inserted
    2.To clear that time stamp if the price is deleted at some later date.

    My problem is with the time stamp value being deleted by the user.
    If I try to clear the price (now that the time cell =empty) I get a Runtime error 91 - Object Variable or With block variable not set.

    I would like to convert this code to a select case statement but I'm not sure how to do this in this situation. Would error coding be appropriate in this instance?

    Any help would be most appreciated.

    Please Login or Register  to view this content.
    Thanks

    Max57
    Last edited by max57; 07-29-2009 at 08:56 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Utilize a Select Case Statement in Target Intersect Statement

    An example workbook and an explanation in context would help.
    Entia non sunt multiplicanda sine necessitate

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

    Re: Utilize a Select Case Statement in Target Intersect Statement

    Hi,

    In the hopes of clarifying my point,I've included a small workbook example that should do the trick. I'm open to all suggestions.

    Again,thanks.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Utilize a Select Case Statement in Target Intersect Statement

    Try this:
    Please Login or Register  to view this content.
    Warning:
    I'm not an expert. I'm still trying to wrap my head around how it works.
    I experimented with a piece of code from StephenR. You can find it here:
    HTML Code: 
    When I deleted a few lines it took a little while to complete the task. Maybe someone can adjust it to speed it up.
    Last edited by Xrull; 07-28-2009 at 11:08 PM.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Utilize a Select Case Statement in Target Intersect Statement

    Try this:
    Please Login or Register  to view this content.

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

    Re: Utilize a Select Case Statement in Target Intersect Statement

    Thanks a lot guys!

    Your codes did the trick.
    Much appreciated.







    Pluralitas non est ponenda sine necessitate

+ Reply to Thread

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