在使用excel vba设计时出现的问题: 对象变量或with块变量未设置

Private Sub Comhuozhanming_Change()
Dim rng As Range
Dim i As Integer
Dim dianhua As String
Dim chaxun As String
Dim shouji As String
Dim quyu As String
With Sheet6.Range("A:A")

Set rng = .Find(what:=Comhuozhanming.Text)
If Not rng Is Nothing Then
i = rng.Row
If Sheet6.Cells(i, 2) = "" And Sheet6.Cells(i, 3) = "" And Sheet6.Cells(i, 4) = "" Then
Labhuozhandianhua.Caption = "电话还没有录入,请录入电话。"
Else
If Sheet6.Cells(i, 2) <> "" Then
dianhua = "电话" & Sheet6.Cells(i, 2)
End If
If Sheet6.Cells(i, 3) <> "" Then
chaxun = "查询电话" & Sheet6.Cells(i, 3)
End If
If Sheet6.Cells(i, 4) <> "" Then
shouji = "手机" & Sheet6.Cells(i, 4)
End If
If Sheet6.Cells(i, 7) <> "" Then
quyu = "主要到达区域为" & Sheet6.Cells(i, 7)
End If
Labhuozhandianhua.Caption = "货站电话:" & dianhua & chaxun & shouji & quyu
End If

Else
Labhuozhandianhua.Caption = ""
userform3.Show '这句提示我对象变量或with块变量未设置是怎么回事呢?
End If
End With

End Sub
我已经制作了userform3窗体。
极有可能是你的Userform3窗体的
Private Sub UserForm_Initialize()
'这里含有代码,代拆绝裤码中有对宏侍象引用没有指明限定对象旅简!!
End Sub
checkbox(i).checkbox.value
最后一个循环体是不是含搜多了个checkbox
感觉你这最让老前后一个坦清循环的n=n+1完全可以写到前两个循环里去