phos 发表于 2005-8-25 13:25:00

[VBA]类型不匹配错误,紧急

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'autocad 2005 vba类型不匹配错误<BR>Public Minpoint, Maxpoint As Variant</P>
<P>Private Sub cutphoto9_Click()<BR>&nbsp; Dim ClipPoints(0 To 99),POINTS(0 To 9),Clippoints1() As Double<BR>&nbsp; Dim kkkk As Integer<BR>&nbsp; Ssetobj.Item(0).GetBoundingBox Minpoint, Maxpoint<BR>&nbsp; number3 = Clipphoto(POINTS, ClipPoints, kkkk, Clippoints1)'调用函数<BR>end sub</P>
<P>Public Function Clipphoto(Pone() As Double, Ptwo() As Double, su As Integer, PPPP() As Double) As Integer<BR>&nbsp; Dim Minx, Miny, Maxx, Maxy As Double<BR>&nbsp; Minx = Minpoint(0)'此句出现类型不匹配错误,请问怎么处理,把Minx 定义为Variant同样出错,有时又不会出错<BR>End Function<BR></P>

wyj7485 发表于 2005-8-25 14:20:00

<P>如此定义:</P>
<P>Dim Minx, Miny, Maxx, Maxy </P>

phos 发表于 2005-8-25 18:35:00

我试了,还是报错

mccad 发表于 2005-8-25 21:05:00

Dim Minx As Double, Miny As Double, Maxx As Double, Maxy As Double

phos 发表于 2005-8-27 20:32:00

多谢
页: [1]
查看完整版本: [VBA]类型不匹配错误,紧急