Results 1 to 9 of 9

run time error method value of object range failed

Threaded View

  1. #1
    Registered User
    Join Date
    05-18-2015
    Location
    paris
    MS-Off Ver
    2010
    Posts
    16

    run time error method value of object range failed

    i'm having a macro runing depending on the value of the cell I1, every time the value in I1 changes, i want the correponded dependent cell values change, there is one case that i want to clear the contents of certain range but in this case the code happens to run into an infinite loop and i have no idea why here is my code, hope someone could help! thanks all in advance!

    Private Sub Clear()
    
    Dim target As Range
    Set target = Range("I1")
    
    If Not Intersect(target, Range("I1")) Is Nothing Then
    
        Select Case Range("I1").Value
    
            Case 1
            Application.ScreenUpdating = False
    ' ________bug starts the next line___________
                Range("H13,D27,H27").Value = ""
                ActiveSheet.Range("I13:I20").ClearContents
                Range("C4").Select
            Application.ScreenUpdating = True
    
            Case 2
                Range("H13,D27,H27").Value = "left"
                Range("I13,E27,I27").Value = "right"
    
            Case 3
                Range("H13,D27,H27").Value = "lateral"
                Range("I13,E27,I27").Value = "central"
    
         End Select
    End If
    End Sub
    Last edited by gloger; 07-27-2015 at 04:57 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Run time Error 1004 Method 'Range' object '_Worksheet 'failed
    By Monica1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 07:42 AM
  2. [SOLVED] Run-time error ‘1004’: Method ‘Range’ of ‘object’_Global’ failed.
    By dhiresh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2013, 12:04 PM
  3. Help! Why am I getting Run-time error '1004': Method 'Range' of object'_Gloabl' Failed
    By ExcelNewbeee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2012, 05:35 PM
  4. [SOLVED] Run time error 1004: method range of object _global failed
    By Danry in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2012, 07:31 PM
  5. Run-time error '1004'. Method 'Range' of object '_Global' failed
    By mjj347 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-24-2012, 11:09 AM
  6. Run-Time Error 1004 Method Range of object _Global Failed?
    By MadDino in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-11-2011, 05:13 AM
  7. Replies: 4
    Last Post: 01-05-2011, 06:37 PM
  8. Run time error 1004 - Method 'Range' of 'Object'_Global' failed
    By excelaspire0219 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-10-2009, 01:18 PM

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