a = Val(Sheet1,Cells(1,3).Value)这句哪错了啊Sub 产品入库()Dim a As LongDim b As IntegerSheets("商品入库以及查询").SelectIf Trim(Cells(7,1).Value) = "" ThenMsgBox "日期请勿留空",vbOKOnlyExit SubEnd Ifa = Val(Sheet1,Cells(1,3).V
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/28 10:56:30
![a = Val(Sheet1,Cells(1,3).Value)这句哪错了啊Sub 产品入库()Dim a As LongDim b As IntegerSheets(](/uploads/image/z/12109285-37-5.jpg?t=a+%3D+Val%28Sheet1%2CCells%281%2C3%29.Value%29%E8%BF%99%E5%8F%A5%E5%93%AA%E9%94%99%E4%BA%86%E5%95%8ASub+%E4%BA%A7%E5%93%81%E5%85%A5%E5%BA%93%28%29Dim+a+As+LongDim+b+As+IntegerSheets%28%22%E5%95%86%E5%93%81%E5%85%A5%E5%BA%93%E4%BB%A5%E5%8F%8A%E6%9F%A5%E8%AF%A2%22%29.SelectIf+Trim%28Cells%287%2C1%29.Value%29+%3D+%22%22+ThenMsgBox+%22%E6%97%A5%E6%9C%9F%E8%AF%B7%E5%8B%BF%E7%95%99%E7%A9%BA%22%2CvbOKOnlyExit+SubEnd+Ifa+%3D+Val%28Sheet1%2CCells%281%2C3%29.V)
a = Val(Sheet1,Cells(1,3).Value)这句哪错了啊Sub 产品入库()Dim a As LongDim b As IntegerSheets("商品入库以及查询").SelectIf Trim(Cells(7,1).Value) = "" ThenMsgBox "日期请勿留空",vbOKOnlyExit SubEnd Ifa = Val(Sheet1,Cells(1,3).V
a = Val(Sheet1,Cells(1,3).Value)这句哪错了啊
Sub 产品入库()
Dim a As Long
Dim b As Integer
Sheets("商品入库以及查询").Select
If Trim(Cells(7,1).Value) = "" Then
MsgBox "日期请勿留空",vbOKOnly
Exit Sub
End If
a = Val(Sheet1,Cells(1,3).Value)
For b = 1 To 9
Cells(a + 11,b).Value = Cells(7,b).Value
Next b
End Sub
a = Val(Sheet1,Cells(1,3).Value)这句哪错了啊Sub 产品入库()Dim a As LongDim b As IntegerSheets("商品入库以及查询").SelectIf Trim(Cells(7,1).Value) = "" ThenMsgBox "日期请勿留空",vbOKOnlyExit SubEnd Ifa = Val(Sheet1,Cells(1,3).V
添加一个按钮,代码如下:
Private Sub CommandButton1_Click()
Cells.Select
Selection.EntireRow.Hidden = False
m = Val(Sheet1.Cells(1, 43).Value)
If Sheet1.Cells(1, m).Value = 0 Then
For i = 2 To Val(Sheet1.Cells(1, 44).Value)
If Sheet1.Cells(i, m).Value = "" And Sheet1.Cells(i - 1, m).Value = "" Then
Rows(i).EntireRow.Hidden = True
ElseIf Sheet1.Cells(i, m).Value = "" And Sheet1.Cells(i - 1, m).Value <> Sheet1.Cells(1, m).Value Then
Rows(i).EntireRow.Hidden = True
ElseIf Sheet1.Cells(i - 1, m).Value = "" And Sheet1.Cells(i, m).Value <> Sheet1.Cells(1, m).Value Then
End If
Next i
End If
For i = 2 To Val(Sheet1.Cells(1, 44).Value)
If Sheet1.Cells(1, m).Value <> Sheet1.Cells(i, m).Value And Sheet1.Cells(1, m).Value <> Sheet1.Cells(i - 1, m).Value Then
Rows(i).EntireRow.Hidden = True
End If
Next i
End Sub
OK!搞定!