Is there any difference using
Application.Union(ActiveCell, Range("A" & i))
as opposed to
Union(ActiveCell, Range("A" & i))
Also, I read that in Excel 2003, if the parameter/cell contains nothing within the Union, then that parameter is not selected. Is this still true in Excel 2010 onwards?
--------------------------
What exactly is
I couldn't really find any documentation on it explaining it in detail. All I could glean is that it is used to set a range to delete.
For example:
If Cells(16, i).Value = "Help" Then
If delRange Is Nothing Then
Set delRange = .Columns(i)
Else
Set delRange = Union(delRange, .Columns(i))
This code actually deletes it :
If Not delRange Is Nothing Then delRange.Delete
I'm assuming that if delRange has not nothing (aka has columns saved), then delete the range.
From what I understand, if the value is "Help" and delRange is not set, then set it to Column i. I don't really follow the part after the "Else". Does it mean that if there is already a delRange, then combine the previous delRange and the new Column i (which is repeated later on using next i code) together to be deleted later?
Also: bonus points if you can tell me what "Call" does. To me, it just seems similar to ".Select" but is it just used for functions?
Bookmarks