liubingoodgood
liubingoodgood
关注数: 67
粉丝数: 71
发帖数: 2,507
关注贴吧数: 40
我的贴吧身份是【文思泉涌的大文学家】,吧龄在四川排名3.56% 是贴吧撬动了我青春的DNA~#贴吧时光机# https://tieba.baidu.com/mo/q/hybrid-usergrow-bigevent2022/memoir?customfullscreen=1&nonavigationbar=1&trackFrom=fatie
有小伙伴可以看看为什么运行中途出错的原因吗 Sub 随机() Dim c As Long Dim x As Integer Dim y As Integer Dim a As Integer '定义公共变量 Randomize '初始化 Range("a:XX").Interior.ColorIndex = xlNone '去掉填充色 reselect: c = Application.WorksheetFunction.RandBetween(0, 16777215) If c = 20 Then GoTo reselect x = Rnd() * 30 '随机数,代表列数 y = Rnd() * 30 '随机数,代表行数 Cells(y, x).Interior.Color = c a = a + 1 If a = 400 Then Exit Sub GoTo reselect End Sub
1
下一页