当我的宏运行时,我做我的其他工作。但是当 msgbox 弹出时,它会留在我的其他窗口后面。
当它弹出时,我怎么能看到它在顶部?
谢谢你。
我想检查另一个 Excel 中的单元格,单元格是否大于“0”。
是否可以在不打开引用excel的情况下完成此操作?
我正在使用此代码通过 vba 发送电子邮件,但我需要将表格作为正文发送。此代码仅发送一个单元格而不是范围。
如何将 Range("B5:D10") 粘贴为邮件正文中的表格?
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = Range("B1").Value
.Cc = Range("B2").Value
.Bcc = Range("B3").Value
.Subject = Range("B4").Value
.Body = Range("B5").Value
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Run Code Online (Sandbox Code Playgroud)
谢谢