![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Excel VBA
liang-guijing
这个作者很懒,什么都没留下…
展开
-
Excel VBA判断工作薄是否已经打开/判断Excel文件是否已经打开
通过遍历已经打开的工作簿*bookName需要加文件后缀名,如.xlsxPublic Function IsWorkbookOpened(bookName As String) Dim wb As Workbook IsWorkbookOpened = False For Each wb In Application.Workbooks If wb.Name = bookName Then IsWorkbookOpened = T原创 2021-06-24 10:39:51 · 4392 阅读 · 0 评论 -
Excel VBA判断是否存在表名
判断Sheet是否已存在Public Function IsSheetExists(sheetName As String) Dim ws As Worksheet On Error Resume Next Set ws = Worksheets(sheetName) IsSheetExists = IIf(ws Is Nothing, False, True) Err.Clear On Error GoTo 0End Function.原创 2021-06-24 10:35:52 · 1348 阅读 · 0 评论 -
Excel VBA 通过Outlook 发送邮件/保存草稿
VBA发送邮件菜单栏,工具 -> 引用 添加Microsoft Outlook 16.0 Object LibraryPublic Sub SaveEmail(recipient As String, subject As String, body As String, Optional attachment As String) Dim OutlookApp As Outlook.Application Dim OutlookItem As Outlook.MailItem原创 2021-06-24 10:29:58 · 2568 阅读 · 1 评论