宏应向用户显示2个选项,并且必须根据该选择执行某些代码
例如公告
在输入宏应相应运行的情况下,用户将选择Option1或Option2进行去皮。
上面的条件只是我整个宏的一小部分
下面是必须在选择框中显示的代码
CallCount1 = Cells(Rows.Count, "A").End(xlUp).Row
Selection.AutoFilter field:=16, Criteria1:="ABANDON"
AbCount1 = Worksheets("Sheet1").AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
Percentage1 = (AbCount1 / CallCount1) * 100
MsgBox Percentage1
Selection.AutoFilter field:=14, Criteria1:=">=60"
AbCount2 = Worksheets("Sheet1").AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
AbCount = AbCount1 - AbCount2
CallCount2 = CallCount1 - AbCount2
Percentage2 = (AbCount2 / CallCount2) * 100
MsgBox Percentage2