|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
增加的模块代码:
Public arr0(1 To 256), arr(1 To 256), arr2(1 To 256), arr22(1 To 256), arr3(1 To 256), arr33(1 To 256), arr4(1 To 256), arr44(1 To 256), arr5(1 To 256), arr55(1 To 256) As Integer
Public HuiQiYiShou As Boolean
Public v, vv As Integer
Sub SheetVisible()
Sheet1.Visible = xlSheetVisible
Sheet2.Visible = xlSheetVisible
Sheet3.Visible = xlSheetVisible
End Sub
Sub SheetVeryHidden()
Sheet1.Visible = xlSheetVeryHidden
Sheet2.Visible = xlSheetVeryHidden
Sheet3.Visible = xlSheetVeryHidden
End Sub
Sub UnDoOne()
Dim i As Long
For i = 1 To 256
Sheet1.Range("B" & i).Value = IIf(arr0(i) = 0, "", arr0(i))
Next i
For i = 1 To 17
Sheet1.Range("Q" & i).Value = arr2(i)
Sheet1.Range("R" & i).Value = arr3(i)
Sheet1.Range("U" & i).Value = arr4(i)
Sheet1.Range("V" & i).Value = arr5(i)
Next i
ThisWorkbook.Worksheets("Data").Names("选中").RefersToRange.Value = v
HuiQiYiShou = True
End Sub
Sub UprotectMainForm()
Dim ar, i%
ar = Array("lblPlayer", "optRed", "lblRed", "optBlack", "lblBlack", "lblHandicap", "optHandicap", "lblLevel", "optLevel", "chkSound", "lblSound", "btnStart", "btnExit", "btnAbout", "Button 1023", "Button 1021", "Button 1022", "Button 1024", "Button 1025")
MsgBox MainForm.Shapes("lblPlayer").Left & "当前窗口可用区域的高度为:" & ActiveWindow.UsableHeight & Chr(10) & "当前窗口的高度为:" & ActiveWindow.Height & Chr(10) & "当前窗口可用区域的宽度为:" & ActiveWindow.UsableWidth & Chr(10) & "当前窗口的宽度为:" & ActiveWindow.Width
For i = 0 To UBound(ar)
MainForm.Shapes(ar(i)).Left = ActiveWindow.UsableWidth * 1 / 2 + IIf(i = 2, 8, IIf(i = 4, 8, IIf(i = 10, 8, 0)))
MainForm.Shapes(ar(i)).Top = (i + 3) * 20 - IIf(i = 1, 8, IIf(i = 3, 8, IIf(i = 9, 8, IIf(i = 2, 30, IIf(i = 4, 30, IIf(i = 10, 30, 20))))))
Next i
MainForm.ProtectSelection = False
MainForm.ProtectFormatting = False
MainForm.Protect DrawingObjects:=False, Contents:=False, Scenarios:=False
End Sub
Sub ProtectMainForm()
MainForm.ProtectSelection = True
MainForm.ProtectFormatting = True
MainForm.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
|
|