网站首页/办公软件列表/内容

excel VBA判断工作表是否存在&不存在时创建

办公软件2024-01-22阅读
Microsoft Excel是Microsoft为使用Windows和Apple Macintosh操作系统的电脑编写的一款电子表格软件。直观的界面、出色的计算功能和图表工具,再加上成功的市场营销,使Excel成为最流行的个人计算机数据处理软件。

Function 表存在(s)
For Each i In Sheets
If i.Name = s & "" Then 表存在 = 1 '连接空白是避免表格名为数值时格式不同
' Debug.Print i.Name = s
Next
End Function

Function 建表(s)
For Each i In Sheets
If i.Name = s Then Exit Function
Next
Sheets.Add(, Sheets(Sheets.Count)).Name = s
' Sheets.Add.Name = s'创建在前面
' Sheets.Add 方法 (Excel):http://www.office9.cnhttp://img.luoboxitong.cn/upload/officetech_Excel8/20211125/404.html />End Function


Excel整体界面趋于平面化,显得清新简洁。流畅的动画和平滑的过渡,带来不同以往的使用体验。

……

相关阅读