VBA显示与隐藏工作表
- Public Sub ButtunClick(sender As Object,e As SpreadsheetGear.Windows.Forms.ShapeActionEventArgs)
- if e.shape.name="Button 1" then
- if AW.Sheets("sheet1").Visible = SheetVisibility.Visible then
- Messagebox.show("隐藏工作表")
- AW.Sheets("sheet1").Visible = SheetVisibility.Hidden
- else if AW.Sheets("sheet1").Visible = SheetVisibility.Hidden then
- Messagebox.show("显示工作表")
- AW.Sheets("sheet1").Visible = SheetVisibility.Visible
- end if
- end if
- End Sub'按钮/标签点击事件
复制代码
测试时,模板中加入多个sheet,测试用按钮 按钮命名为button1
|
|
hessen