Run-Time error '1004' The specified value is out of range

后端 未结 3 1326
情深已故
情深已故 2021-01-28 02:27
Sub FindInShapes1()   
Dim rStart As Range
Dim shp As Shape
Dim sFind As String
Dim sTemp As String
Dim Response

sFind = InputBox(\"Search for?\")
If Trim(sFind) = \"\"         


        
3条回答
  •  轮回少年
    2021-01-28 03:27

    Sorry to break the convention but the similar error I get:

    The specified value is out of range
    Run-time error -2147024809
    

    In my scenario I am simply returning a shape as part of a GET property in side a class that store a Shape Object. The property works for Shape Type Text Boxes but craps out on sending back Line Shapes. As per below. I cannot use the on error, Or don't know how because the error occur at End Property?

    Public Property Get shp_Obj() As Shape
        If prvt_int_Ordinal = 13 Them
    
            MsgBox prvt_Shp_Shape.Name, , "prvt_Shp_Shape.Name"
    
    
    
        Set shp_Obj = prvt_Shp_Shape
       End If
    
    End Property
    

提交回复
热议问题