Results 1 to 5 of 5

VBA or Conditional Format to change font on scroll

Threaded View

  1. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: VBA or Conditional Format to change font on scroll

    If you want this code to work on a specific sheet, put it in the module for that sheet.

    There is no built-in event to determine that the user has scrolled, but you can use the ChangeSelection event which will trigger if they click on any cell. It is possible to write some complicated code to detect scrolling but I'm not sure it's worth it, depending on exactly how you want this to work.

    I put this code in your Test sheet module. Any time you select a cell, it will turn the font white if row 15 is visible on the screen.
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
          If Not Intersect(Range("A15"), ActiveWindow.VisibleRange) Is Nothing Then
             Range("A4").Font.Color = RGB(255, 255, 255)
          End If
       
    End Sub
    If you really really need to detect scrolling let me know and we'll go down that rabbit hole.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 07-31-2021, 03:23 PM
  2. Replies: 9
    Last Post: 12-08-2020, 04:15 PM
  3. [SOLVED] Conditional Format VBA - Change Text Box Font Color
    By joelyyc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2014, 11:38 AM
  4. Conditional format formula need to change font colour
    By Si902 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-24-2010, 09:57 AM
  5. conditional format formula to change font color
    By johncena in forum Excel General
    Replies: 3
    Last Post: 06-30-2010, 04:17 AM
  6. Change default font format in Excel
    By Michael Lortz in forum Excel General
    Replies: 3
    Last Post: 12-16-2005, 09:50 PM
  7. Can one change the font or format of a sheet name?
    By KMcGrail in forum Excel General
    Replies: 2
    Last Post: 06-14-2005, 06:05 AM

Tags for this Thread

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