+ Reply to Thread
Results 1 to 2 of 2

Run Time Error 424:Object Required

Hybrid View

ewalton87 Run Time Error 424:Object... 01-19-2011, 08:01 PM
Mordred Re: Run Time Error 424:Object... 01-19-2011, 09:33 PM
  1. #1
    Registered User
    Join Date
    01-19-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Run Time Error 424:Object Required

    I am not very familiar with how macros work and every time I run this macro I get the run-time error. I am completely lost in how to fix the macro to make it work.

    The part that I am having problems with is the section that begins with, "If CheckBox1.Object=FALSE". I am unable to get past this line in the macro. Any help would be greatly appreciated.

    Sub Step_3_AY72()
    '
    ' Step_3_AY72 Macro
    '
        Dim YR As String
        YR = Range("C24")
    
        Dim DT As String
        DT = Range("C27")
    
        Dim MNTH As String
        MNTH = Range("D23")
    
    For Each wb In Workbooks
        If wb.Name = "Top100gen2start.xls" Then
            MsgBox "You need to close the Top100gen2start.xls file before proceeding.", , "Close Top100gen2start.xls file"
            Exit Sub
        End If
    Next
    
    If CheckBox1.Object = False And CheckBox2.Object = False And CheckBox3.Object = False And CheckBox4.Object = False And CheckBox5.Object = False Then[/COLOR][/COLOR]
        MsgBox "You didn't select a sector report to run!", , "Select a sector report"
        Exit Sub
    End If
    
    If CheckBox1.Object = True Then
        Call FullBlown
        If gameover = 1 Then
            Exit Sub
        End If
    
    End If
    
    If Top100Check = 1 Then
        Exit Sub
    End If
    
    If CheckBox2.Object = True Then
        Call Short
        If gameover = 1 Then
            Exit Sub
        End If
    End If
    
    If Top100Check = 1 Then
        Exit Sub
    End If
    
    If CheckBox3.Object = True Then
        Call Intermediate_4_to_7
        If gameover = 1 Then
            Exit Sub
        End If
    End If
    
    If Top100Check = 1 Then
        Exit Sub
    End If
    
    If CheckBox5.Object = True Then
        Call Intermediate_7_to_9
        If gameover = 1 Then
            Exit Sub
        End If
    End If
    
    If Top100Check = 1 Then
        Exit Sub
    End If
    
    If CheckBox4.Object = True Then
        Call Long9
        If gameover = 1 Then
            Exit Sub
        End If
    End If
    
    If Top100Check = 1 Then
        Exit Sub
    End If
    
    End Sub
    Last edited by ewalton87; 01-19-2011 at 08:13 PM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Run Time Error 424:Object Required

    I don't know if this is the answer but trying declaring MNTH, YR, & DT as Variant instead of String.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

+ 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