Results 1 to 10 of 540

Thread: Appendix Thread. App Index Rws() Clms() Majic code line Codings for other Threads, Tables etc) TEST COPY

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    in support of this post:
    https://excel.tips.net/T001940_Hidin...ell_Value.html
    https://excel.tips.net/T001940_Hiding_Rows_Based_on_a_Cell_Value.html



    Hello Ryanne
    Rather than modifying the coding, it would probably be easier to use a simple "events" type coding which automatically kicks in when a range value is changed in a worksheet. Something of this form:.

    Code:
    Private Sub Worksheet_Change(ByVal Target As Range)
     Target.EntireRow.Hidden = True
    End Sub
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    'Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    '
    'End Sub
    This coding will need to be in a worksheet code module.
    Follow , for example these 6 steps to create such a coding:

    _1) Right click on the tab of the worksheet of interest
    _2) Select View Code
    Worksheet code module via View Code after right click on tab.JPG : : https://imgur.com/ZiOuRVT
    Attachment 2426

    _3) Select the left side drop down list
    _4) Select Worksheet
    Worksheet.JPG : https://imgur.com/tCwHKBo
    Attachment 2427

    _5) Select the right drop down list
    _6) Select Change
    Change.JPG : https://imgur.com/NkbNPsL
    Attachment 2428

    ( Delete or ' comment out any other coding, such as the Private Sub Worksheet_SelectionChange which may have appeared automatically at step 4 )



    You can now add your coding within the Private Sub Worksheet_Change


    ( Hit Alt+F11 to return to spreadsheet view )

    The coding will kick off automatically when you change any cell value. It will hide the entire row which contains the cell whose value you changed


    In the uploaded file , I have added the coding to the third worksheet code module

    Alan
    Attached Images Attached Images
    Attached Files Attached Files

Similar Threads

  1. Replies: 189
    Last Post: 02-06-2025, 02:53 PM
  2. Replies: 540
    Last Post: 04-24-2023, 04:23 PM
  3. Replies: 3
    Last Post: 03-07-2022, 05:12 AM

Posting Permissions

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