mumps
Well-known Member
- Joined
- Apr 11, 2012
- Messages
- 13,457
- Office Version
- 2013
- 2010
- Platform
- Windows
I have the following macro which produces the error:
After doing much research, I can't seem to find a solution to the problem. Any suggestions would be greatly appreciated.
Code:
Sub Test()
Dim uRng As Range
Dim ws As Worksheet
For Each ws In Sheets
If ws.Name <> "Summary" Then
If Not uRng Is Nothing Then
Set uRng = Union(uRng, ws.Cells(6, 3))
Else
Set uRng = ws.Cells(6, 3)
End If
End If
Next ws
End Sub