Help to Multi Range Code in Sheets(1)

  • Hi Forum.


    There is a description on the problem in the attached, when opening.
    But I'll describe my problem here too.
    ---------------------------------


    Depending of the selected area, the cells will OnFocus change to yellow and change back OffFocus.
    And it's only in the selected area.


    My problem is in the code in Sheets(1) = Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    The range in my real worksheet is far to big and makes a BUG :confused:
    The code runs, if I only use 2/3 of the range.


    Below in this Sheets(1), is a copy of the code from my real Worksheet.
    And in this code I had tried to set up a Multi Range, to split up the Range-codes.


    There is a REM-line in both the "Small area" and the "Big area".
    They REM-line is the original Range-code, which makes the BUG.


    Just below the two REM-lines is the codes I had tried to set up.
    They should define Range r1-r2 and r3-r4.


    But I can't figure out, how to make the codes.
    I hope to get some help.


    Kind regards
    Ib

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!