1

我正在尝试与打开一个新窗口的按钮(用 vb 制作)共享一张工作表,但是当我分享它时,引导到另一个窗口锁定的按钮简单不起作用(是的,我未选中锁定),我需要一些东西做共享那个按钮和另一个窗口?

此窗口的工作是编辑单元格。

这是窗口中的代码,有:

private Sub CommandButton1_Click()
Dim i, a, b, c, d
Dim prio As String
i = CInt(Sheets("Sheet1").Cells(6, 17))
a = CInt(Sheets("Sheet1").Cells(7, 17))


Sheets("Sheet1").Cells(i, 1) = a
Sheets("Sheet1").Cells(i, 2) = Peca.Text
Sheets("Sheet1").Cells(i, 3) = Qt.Text
Sheets("Sheet1").Cells(i, 4) = ComboBox1.Value
Sheets("Sheet1").Cells(i, 5) = Responsavel.Text
Sheets("Sheet1").Cells(i, 6) = Cliente.Text
Sheets("Sheet1").Cells(i, 7) = Maquina.Text
Sheets("Sheet1").Cells(i, 8) = NumSerie.Text
Sheets("Sheet1").Cells(i, 9) = Modelo.Text
Sheets("Sheet1").Cells(i, 10) = Obser.Text



Sheets("Sheet1").Cells(6, 17) = CInt(Sheets("Sheet1").Cells(6, 17)) + 1
Sheets("Sheet1").Cells(7, 17) = CInt(Sheets("Sheet1").Cells(7, 17)) + 1
Peca.Text = ""
Qt.Text = ""
ComboBox1.Value = ""
Responsavel.Text = ""
Cliente.Text = ""
Maquina.Text = ""
NumSerie.Text = ""
Modelo.Text = ""
Obser.Text = ""
End Sub

Private Sub CommandButton2_Click()
Sheets("Sheet1").Cells(12, 15) = Cliente.Text
End Sub

Private Sub CommandButton3_Click()
Sheets("Sheet1").Cells(12, 15) = Maquina.Text
Sheets("Sheet1").Cells(13, 15) = NumSerie.Text
Sheets("Sheet1").Cells(14, 15) = Modelo.Text
End Sub

Private Sub CommandButton4_Click()
Cliente.Text = Sheets("Sheet1").Cells(12, 15)
End Sub

Private Sub CommandButton5_Click()
Maquina.Text = Sheets("Sheet1").Cells(12, 15)
NumSerie.Text = Sheets("Sheet1").Cells(13, 15)
Modelo.Text = Sheets("Sheet1").Cells(14, 15)
End Sub
4

0 回答 0