|
楼主 |
发表于 2024-1-27 21:09
|
显示全部楼层
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim cs As Long
Dim x, y, sh
Set sh = ActiveSheet
x = ActiveCell.Row
y = ActiveCell.Column
cs = ListBox1.ListIndex
If cs <= 0 Then Exit Sub
Cells(x, "B") = CStr(ListBox1.List(ListBox1.ListIndex, 0))
Cells(x, "C") = CStr(ListBox1.List(ListBox1.ListIndex, 1))
Cells(x, "D") = CStr(ListBox1.List(ListBox1.ListIndex, 2))
Cells(x, "J") = CStr(ListBox1.List(ListBox1.ListIndex, 3))
If Not Range("C3") Is Nothing Then
Chu = Replace(Cells(x, "B"), " ", "")
s = Range("C3") & "," & Chu & "," & Cells(x, "I")
Cells(x, "G") = 产品售价查询(s)
End If
ActiveCell.Offset(1, 0).Select
End Sub
|
|