ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code error (https://www.excelbanter.com/excel-programming/419814-code-error.html)

ordnance1

Code error
 
I had code which worked great under Excel 2003 but not working under Excel
2007.

I get the following error Method 'Union" of object '_Global' failed with
the code below

If Union(Target, Range("B5:B6")).Address = Range("B5:B6").Address Then
SortModule.PTOSort

Gary''s Student

Code error
 
If Target.Address="$B$5:$B$6" Then
SortModule.PTOSort

--
Gary''s Student - gsnu200812


"ordnance1" wrote:

I had code which worked great under Excel 2003 but not working under Excel
2007.

I get the following error Method 'Union" of object '_Global' failed with
the code below

If Union(Target, Range("B5:B6")).Address = Range("B5:B6").Address Then
SortModule.PTOSort



All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com