VBA菜鸡的小本本

Application

Application.ScreenUpdating = False
关闭脚本运行时界面自动刷新
Application.DisplayAlerts = False
关闭警报对话框
Dim sheet As Worksheet
 For Each sheet In Worksheets
 If sheet.Name <> ActiveSheet.Name Then sheet.Delete
 Next sheet
删除非激活工作表
Range("A1:B20").Clear
Range("A1:B20").ClearComments
Range("A1:B20").ClearContents
Range("A1:B20").ClearFormats

清除单元格的所有包括批注、内容、注释、格式等内容
清除单元格的批注
清除单元格的内容
清除单元格的格式

 

发布者:Templar Aiur

85后,一个做《星际争霸II》MOD起家的策划,一直在追寻牛逼的道路上徘徊

留下评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

You are commenting using your WordPress.com account. Log Out /  更改 )

Google photo

You are commenting using your Google account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )

Connecting to %s