Results 1 to 7 of 7

Conditional Worksheet Events

Threaded View

max57 Conditional Worksheet Events 01-31-2010, 04:48 PM
Leith Ross Re: Conditional Worksheet... 01-31-2010, 04:55 PM
max57 Re: Conditional Worksheet... 01-31-2010, 05:27 PM
Leith Ross Re: Conditional Worksheet... 01-31-2010, 07:15 PM
max57 Re: Conditional Worksheet... 01-31-2010, 07:40 PM
Leith Ross Re: Conditional Worksheet... 01-31-2010, 08:22 PM
max57 Re: Conditional Worksheet... 02-01-2010, 02:14 PM
  1. #1
    Forum Contributor
    Join Date
    07-11-2009
    Location
    NYC,USA
    MS-Off Ver
    Excel 2007
    Posts
    135

    Conditional Worksheet Events

    Hello,

    I would like to have a nested if or select case statement to handle a worksheet event.
    The conditions it will check are:
    1. Make sure target is w/in range, otherwise EXIT
    2. Make sure that target offset value is not empty, otherwise display message
    3. All is good, open form

    I’ve tried various formulations and positionings of the statements ,but not all conditions are met with equal success.
    What happens is I get the the first two conditions, but the third doesn’t work.

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
        Dim Rng1 As Range
        Set Rng1 = Range("DBlClick")
        
    If Intersect(Target, Rng1) Is Nothing Then Exit Sub
        	 Cancel = True
    
     	 'If Intersect(Target.Cells.Offset(0, -6), Rng1) Is Nothing Then
       	  '  MsgBox "You must first fill in the necessary data "
      ‘Exit Sub   
    
            	  frm_EditPricing.Show
    
    End Sub

    I’ve attached a workbook for clarification

    Thanks
    Mark
    Attached Files Attached Files
    Last edited by max57; 01-31-2010 at 07:42 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