Multiple Columns in Columns Property?

D

Don Wiss

This line of code works. But can't I combine the range into one covering
columns 2 to 4?

If Intersect(Union(Range("LOBInput").Columns(2), Range("LOBInput").Columns(3), Range("LOBInput").Columns(3)), Target) IsNothing Then

Don <www.donwiss.com> (e-mail link at home page bottom).
 
D

Dave Peterson

maybe...

if intersect(me.range("lobinput").columns(2).resize(,3), target) is nothing then
 
J

JMB

Not as nice as Dave's, but just to throw out another possible approach:

Sub test()
With Range("LobInput")
If Interesect(.Range("B1:D" & .Rows.Count), Target) Is Nothing Then
'......
End If
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top