Hi there,
I'm sure this is a really simple error, does anyone know what the problem is with the below code?
Many thanksPlease Login or Register to view this content.
Hi there,
I'm sure this is a really simple error, does anyone know what the problem is with the below code?
Many thanksPlease Login or Register to view this content.
Try the below code....
Please Login or Register to view this content.
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
Thanks again, but I don't think that will quite work. If you look closely it actually runs two different macros? One is called CopyActiveCell and the other CopyActiveCell1
why are there 2 subs with the same name?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("B1:B900"))>0 Then
Call CopyActiveCell
else
If Intersect(Target, Range("D1:D900"))>0 Then Call CopyActiveCell1
end if
End Sub
It now says else without if. Although I haven't done your '>0' bit because that bought more errors
Oops... try this...
Please Login or Register to view this content.
Excellent perfect thank you
regarding the sub names I would add an underscore to avoid confusion, CopyActiveCell_1Please Login or Register to view this content.
Thanks sorted
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks