+ Reply to Thread
Results 1 to 5 of 5

On Screen Error when highlighting Rows

  1. #1
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    On Screen Error when highlighting Rows

    ..

    Good afternoon all

    With a lot of good work gone into setting up some coding for me,
    I now seem to have a problem that if I want to change the size of the rows
    from row (4 ) and downwards it is putting a lot of unwanted data into ALL of the cells
    that are highlighted. The info is emanating from cell C5..

    Attached is 1 document ( with a screen grab ), the second is the sample file.

    I trust will be a eaze fix.???


    Many Thanks in advance.


    Peter
    Attached Files Attached Files
    One I have learnt over the last few months, " You are NEVER too old to learn ".
    Sometimes I forget to say " Thank You " for your assistance, so here I say " A BIG Thank You. "

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    915

    Re: On Screen Error when highlighting Rows

    The quickest (but rough) way is to add this line of code in the event Worksheet_SelectionChange macro. This to avoid it triggering when you select more than one cell. In this case it will be three since you have merged cells:
    Please Login or Register  to view this content.
    Last edited by rollis13; 01-01-2022 at 05:48 AM.

  3. #3
    Forum Contributor Potholes's Avatar
    Join Date
    11-25-2011
    Location
    Brisbane
    MS-Off Ver
    Office 2021
    Posts
    774

    Re: On Screen Error when highlighting Rows

    ..

    Good evening Rollis13 and anybody looking at my thread

    Thank you for your code works fine but only on sheet 1,

    Any ideas here please.


    Thanks again

    Peter
    Last edited by Potholes; 01-01-2022 at 05:05 AM. Reason: Reedit additional info

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,208

    Re: On Screen Error when highlighting Rows

    Potholes...Compliments of the season to you...
    You have duplicate code in all sheets...Delete this code from all the Sheet Modules and try this in...
    ThisWorkbook Module
    Please Login or Register  to view this content.
    Also...amazing that you would go through all the trouble and code just to add a date to a cell...
    Why not just allow date entry forcing to DD/MM/YYYY format...

    My honest opinion...I would have only 1 Template and build a Userform Interface to populate this template based on selections and entries made...This will ensure no interaction with the sheets anyway...But that's just me...

    I mean...you go through all the trouble to build a Userform Interface just to print sheets?
    Attached Files Attached Files
    Last edited by sintek; 01-01-2022 at 05:32 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    915

    Re: On Screen Error when highlighting Rows

    works fine but only on sheet 1
    That's right but you duplicated your macro where you needed it, so, you need to change the code in every sheet where you have the macro with event Worksheet_SelectionChange.
    Analyzed your project, as suggested by @sintek, it would be more 'professional' to have a single macro to trigger event Workbook_SheetSelectionChange.
    Last edited by rollis13; 01-01-2022 at 06:00 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Highlighting every next rows after a row containing specific text and splitting rows
    By Khalid.Noor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2018, 04:44 AM
  2. Highlighting price changes / #N/A error
    By PamB in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-09-2015, 06:48 AM
  3. [SOLVED] Highlighting multiple rows through a worksheet depending a cell value in the rows
    By loked in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-19-2014, 01:31 AM
  4. highlighting won't show on screen
    By shirahbell in forum Excel General
    Replies: 3
    Last Post: 02-01-2011, 04:11 AM
  5. [SOLVED] Range.Select error and screen maximizing error in Workbook_Open()
    By Punsterr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2006, 05:20 PM
  6. [SOLVED] Range.Select error and screen maximizing error in Workbook_Open()
    By Punsterr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2006, 03:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1