2014-01-18 114 views
0

我需要在活动单元格的行中选择几个单元格并将它们显示在电子邮件中。选择活动行中的单元格并以vba显示

我在互联网上得到了以下结果,但是在结果上这是回滚True

With ActiveCell 
Range(Cells(.Row, "B"), Cells(.Row, "D")).Select 
End With 

我有电子邮件代码工作正常,但选择工作不太好。

请协助。

回答

0

只给如何你的代码可能最好写一个例子,我不知道什么是包含在这些细胞中......

Dim emailTo As String 
Dim emailSubject As String 
Dim emailBody As String 
'# ... 
With ActiveCell 
    emailTo = Cells(.Row, "B").Value 
    emailSubject = Cells(.Row, "C").Value 
    emailBody = Cells(.Row, "D").Value 
End With 
'# ... 
Call SendEmail(emailTo, emailSubject, emailBody) 
+0

感谢艾格尼丝。不知道这很简单。 – user3209235