1

I need some help fixing this error a ran into with a named range. So I'm getting the "Method range of object global failed" on Range("Frost_T"). I defined the Range Frost_T in the name manger but it's not exactly a range it's basically just a formula taking an input from a cell to calculate an output and the output itself is not in a define cell it's just under Frost_T and then I callout that name in other formulas within the workbook. That part works fine it's when I try to use it in VBA for macros It's not working. I need help to learn how to callout these kind of named range that aren't really in a range of cells but just kept under it's name. I tied explaining it the best way I can but if you need more details let me know. See code bellow.

Thanks in advance for the help!

Sub OA_T_Reset()

  If Range("CB_CL_Values").Cells(6) = 1 Then

    If Range("Inputs_OA").Cells(3) < Range("Frost_T") = True Then
    Range("Inputs_OA").Cells(3).Value = Range("Frost_T")

    Else

    End If

  Else

  End If


End Sub
1
  • 1
    you don't need the = True in your condition. You can just use if A < B Then. Commented Jan 21, 2014 at 14:00

1 Answer 1

2

Try to change Range("Frost_T") to Evaluate("Frost_T") as follows:

Sub OA_T_Reset()

    If Range("CB_CL_Values").Cells(6) = 1 Then
        If Range("Inputs_OA").Cells(3) < Evaluate("Frost_T") Then
            Range("Inputs_OA").Cells(3).Value = Evaluate("Frost_T")
        Else

        End If
    Else

    End If

End Sub
Sign up to request clarification or add additional context in comments.

1 Comment

And it's working! Thanks for helping out a noob. Cheers Buddy!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.