JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
Hi All,
Can somebody please tell me why ?
In all the examples that I find on the web, I see that when sending information from Excel (or word) to Outlook, there are these 4 steps for sending variables.
'Step 1 - Declare the Variable
Dim rngTo As Excel.Range
'Step 2 - Set the Variable
Set rngTo = .Range("B11")
'Step 3 - use the Variable
.To = rngTo.Value
'Step 4 - Release the Variable
Set rngTo = Nothing
Please excuse my ignorance, but I don't understand why combining Steps 2 & 3 into one line, like below, is not a good way of doing this.
.To = .Range("B11")
Can I assume that if I use .To = .Range("B11"), that the ".To" may not be explicity declared as an Excel Range, which could be contributing periodic errors?
Can somebody please help me understand?
Thanks in advance
Can somebody please tell me why ?
In all the examples that I find on the web, I see that when sending information from Excel (or word) to Outlook, there are these 4 steps for sending variables.
'Step 1 - Declare the Variable
Dim rngTo As Excel.Range
'Step 2 - Set the Variable
Set rngTo = .Range("B11")
'Step 3 - use the Variable
.To = rngTo.Value
'Step 4 - Release the Variable
Set rngTo = Nothing
Please excuse my ignorance, but I don't understand why combining Steps 2 & 3 into one line, like below, is not a good way of doing this.
.To = .Range("B11")
Can I assume that if I use .To = .Range("B11"), that the ".To" may not be explicity declared as an Excel Range, which could be contributing periodic errors?
Can somebody please help me understand?
Thanks in advance
Last edited: