tnjk.net
当前位置:首页 >> workBook BEForEClosE >>

workBook BEForEClosE

Workbooks(name1).Close SaveChanges:=False '关闭指定name1 ThisWorkbook.Close SaveChanges:=False '关闭指定工作薄 ActiveWorkbook.Close SaveChanges:=False '关闭当前活动工作薄

不在 Workbook_BeforeClose 事件写程序,而是在添加专属的工具栏时,把它设置为临时的。下面时在 帮助中复制的相关内容,以做参考: Add方法应用于 CommandBars 对象的情形。 新建一个命令栏并添加到命令栏集合。返回 CommandBar 对象。 express...

Private Sub Workbook_BeforeClose(Cancel As Boolean) ThisWorkbook.Close savechanges:=False End Sub 亲 只需要在workbook 的BeforeClose 事件里面写上我...

Private Sub Workbook_BeforeClose(Cancel As Boolean) ThisWorkbook.Saved = True Application.CutCopyMode = False '关闭剪贴板提示 If Workbooks.Count =...

Excel.WorkbookEvents_EventProvider.add_BeforeClose(WorkbookEvents_BeforeCloseEventHandler ) +125 Excel.WorkbookClass.add_BeforeClose(WorkbookEvents_BeforeClose...

原句:Private Sub Workbook_BeforeClose(Cancel As Boolean)我知道是关闭时执行代码。谢谢大家!安言Anyouth 推荐于2016-02-17 09:16:45 最佳答案 括号里面是参数...

Sub Testing()ThisWorkbook.Close TrueEnd Sub经实际测试,True会保存修改,False不会保存修改! 建议你再试试!

如何锁住EXCEL自己的关闭按钮用vba就行了,你提到了自己做按钮,想来基本的vba是会一些的代码之一Dim closeflag As BooleanPrivate Sub workbook_beforeclose(cancel ...

'Workbooks(1).Close ActiveWorkbook.Close 这两名都不一定指向你想要的公作表

Private Sub Workbook_BeforeClose(Cancel As Boolean) If thisworkbook.Name = "采购入库.xlsm" Then Workbooks("库存盘点表.xlsm").Close else ...

网站首页 | 网站地图
All rights reserved Powered by www.tnjk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com