EXCEL 在使用VBA编程中,如何让msgbox对话框中有当前工作表的自定义名字~

发布网友 发布时间:2022-04-24 02:18

我来回答

2个回答

热心网友 时间:2023-10-21 14:11

For sh = 1 To 54
With Sheets(sh)
.Activate
For i = 2 To .Cells(65536, 2).End(xlUp).Row
If Int(Date) - Int(.Cells(i, 11).Value) >= 30 And Int(Date) - Int(.Cells(i, 11).Value) <= 37 Then
.Rows(i).Select
MsgBox "客户:" & .Name & Chr(10) & "合同编号:" & .Cells(i, 2).Value & Chr(10) & "发货日期:" & .Cells(i, 11).Value & Chr(10) & "该合同已到收款日期,请及时收款!!"
End If
Next i
End With
Next

热心网友 时间:2023-10-21 14:12

修改这句
MsgBox "合同编号:" & .Cells(i, 2).Value & Chr(10) & "发货日期:" & .Cells(i, 11).Value & Chr(10) & "该合同已到收款日期,请及时收款!!" & "客户名字是" & .name

热心网友 时间:2023-10-21 14:11

For sh = 1 To 54
With Sheets(sh)
.Activate
For i = 2 To .Cells(65536, 2).End(xlUp).Row
If Int(Date) - Int(.Cells(i, 11).Value) >= 30 And Int(Date) - Int(.Cells(i, 11).Value) <= 37 Then
.Rows(i).Select
MsgBox "客户:" & .Name & Chr(10) & "合同编号:" & .Cells(i, 2).Value & Chr(10) & "发货日期:" & .Cells(i, 11).Value & Chr(10) & "该合同已到收款日期,请及时收款!!"
End If
Next i
End With
Next

热心网友 时间:2023-10-21 14:12

修改这句
MsgBox "合同编号:" & .Cells(i, 2).Value & Chr(10) & "发货日期:" & .Cells(i, 11).Value & Chr(10) & "该合同已到收款日期,请及时收款!!" & "客户名字是" & .name

热心网友 时间:2023-10-21 14:11

For sh = 1 To 54
With Sheets(sh)
.Activate
For i = 2 To .Cells(65536, 2).End(xlUp).Row
If Int(Date) - Int(.Cells(i, 11).Value) >= 30 And Int(Date) - Int(.Cells(i, 11).Value) <= 37 Then
.Rows(i).Select
MsgBox "客户:" & .Name & Chr(10) & "合同编号:" & .Cells(i, 2).Value & Chr(10) & "发货日期:" & .Cells(i, 11).Value & Chr(10) & "该合同已到收款日期,请及时收款!!"
End If
Next i
End With
Next

热心网友 时间:2023-10-21 14:12

修改这句
MsgBox "合同编号:" & .Cells(i, 2).Value & Chr(10) & "发货日期:" & .Cells(i, 11).Value & Chr(10) & "该合同已到收款日期,请及时收款!!" & "客户名字是" & .name

热心网友 时间:2023-10-21 14:11

For sh = 1 To 54
With Sheets(sh)
.Activate
For i = 2 To .Cells(65536, 2).End(xlUp).Row
If Int(Date) - Int(.Cells(i, 11).Value) >= 30 And Int(Date) - Int(.Cells(i, 11).Value) <= 37 Then
.Rows(i).Select
MsgBox "客户:" & .Name & Chr(10) & "合同编号:" & .Cells(i, 2).Value & Chr(10) & "发货日期:" & .Cells(i, 11).Value & Chr(10) & "该合同已到收款日期,请及时收款!!"
End If
Next i
End With
Next

热心网友 时间:2023-10-21 14:12

修改这句
MsgBox "合同编号:" & .Cells(i, 2).Value & Chr(10) & "发货日期:" & .Cells(i, 11).Value & Chr(10) & "该合同已到收款日期,请及时收款!!" & "客户名字是" & .name

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com