对象变量或With块变量未设置
Private Sub Grid1_DblClick()Dim i As Long
With Grid1
Form2.Grid1.Rows = Form2.Grid1.Rows + 1
For i = 1 To Grid1.Rows - 1
Form2.Grid1.Cell(i, 1).Text = .Cell(i, 1).Text
Form2.Grid1.Cell(i, 2).Text = .Cell(i, 2).Text
Form2.Grid1.Cell(i, 3).Text = .Cell(i, 3).Text
Form2.Grid1.Cell(i, 4).Text = .Cell(i, 4).Text
Form2.Grid1.Cell(i, 5).Text = .Cell(i, 5).Text
Form2.Grid1.Cell(i, 6).Text = .Cell(i, 6).Text
Form2.Grid1.Cell(i, 7).Text = .Cell(i, 7).Text
Form2.Show
Next i
End With
End Sub
这里提示“对象变量或With块变量未设置”
求解!