依葫芦画瓢。让大家见笑了。请大家知道,下列代码有错吗?~
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$T$3" Then Select Case Target.Value Case "PCB板" rows("48:247").Entirerow.Hidden = True Case "包材" rows("29:48, 68:247").Entirerow.Hidden = True Case "冲压件" rows("29:68, 88:247").Entirerow.Hidden = True Case "电子料" rows("29:88, 108:247").Entirerow.Hidden = True Case "光头" rows("29:108, 128:247").Entirerow.Hidden = True Case "马达" rows("29:128, 148:247").Entirerow.Hidden = True Case "塑胶" rows("29:148, 168:247").Entirerow.Hidden = True Case "小五金" rows("29:168, 188:247").Entirerow.Hidden = True Case "橡胶杂件" rows("29:188, 208:247").Entirerow.Hidden = True Case "连接器" rows("29:208, 228:247").Entirerow.Hidden = True Case "主芯片" rows("29: 228").Entirerow.Hidden = True End Select End If
|