|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
在offices下执行该代码,多少版本都没问题,可在WPS(已加载VBA补丁)就指向“Sub disp_1() ” 代码执行被中断,单独调试执行没问题,再在主页中运行也不提示了,可重新打开该文件又是“代码执行被中断”,真是无语了,要是[继续]还能运行,可就个提示啊“代码执行被中断”! 有没有高手指定一二
Sub disp_1()
If Cells(1, 234).Value = 1 Then
If Selection.Rows.Count = 1 And Selection.Columns.Count = 1 Then
If Selection.Row > 8 And Selection.Column = 2 Then
rngrow = ActiveCell.Row
UserForm1_1.Top = ActiveCell.Row 'UserForm1_1.Top = Selection.Top
UserForm1_1.Left = Selection.Left + Selection.Width
UserForm1_1.Show
End If
End If
Else
rngrow = ActiveCell.Row
If Cells(1, 234).Value = 4 Or Cells(1, 234).Value = 3 Or Cells(1, 234).Value = 2 Then
rngrow_f = ActiveCell.Column
If rngrow_f = 7 Then
UserForm1.Show
End If
If rngrow_f = 8 Then
UserForm5.Show
End If
End If
End If
End Sub
|
|