由于代码比较长,只把出错的地方粘出来了
Public Sub hjhf()
Dim Movement As Boolean
Dim opoints2 As New MapObjects2.Points
Dim opoints1 As New MapObjects2.Points
Dim opoints As New MapObjects2.Points
Dim oLine As New MapObjects2.Line
Dim opoint2 As New MapObjects2.Point
Dim hLine As MapObjects2.Line, vLine As MapObjects2.Line
Dim hPoints As MapObjects2.Points, vPoints As MapObjects2.Points
Dim hPntA As MapObjects2.Point, vPntA As MapObjects2.Point
Dim hPntB As MapObjects2.Point, vPntB As MapObjects2.Point
Dim ptbuffer As MapObjects2.Polygon
Dim k As Variant
Dim j As Variant
Dim p As Variant
'Dim opoint2 As New MapObjects2.Point
Dim huifang3(100) As String
Dim huifang4(100) As String
Dim huifang5(100) As String
Dim huifang6(100) As String
Dim Combo4 As ComboBox
Dim adodc33 As Adodc '如果不对combo和adodc33定义,则提示对象变量没有定义,定义之后提示下面的错误
Dim q As Integer
Movement = False
Set opoints2 = Nothing
Set opoints1 = Nothing
Set opoints = Nothing
Set oLine = Nothing
frmRiver.Map1.TrackingLayer.ClearEvents
frmRiver.Map1.TrackingLayer.Refresh True
Adodc33.RecordSource = "select * from convert5 where mingcheng=" & "'" & Combo4.Text & " '"
Adodc33.Refresh '提示出错的地方
[此贴子已经被作者于2007-4-16 14:51:05编辑过]