Results 1 to 3 of 3

VBA to Hide & Show Rows

Threaded View

  1. #1
    Registered User
    Join Date
    02-11-2020
    Location
    New Zealand
    MS-Off Ver
    Office 2016
    Posts
    1

    Question VBA to Hide & Show Rows

    Hi all,


    I'm a complete noob when it comes to VBA scripts, I've never used it before and I'm not a programmer at all. I found a VBA script online and I don't know enough to modify it to suit my needs.


    The script has 2 functions - HideRows and ShowRows. When you run them, you are asked to specify a range. For example, I can provide the following range:

    'Sheet 1'!H7:H24


    It will then look at the cells at H7~H24 in Sheet 1 and hide or unhide the row(s), depending on whether the cell value is a 0 or not.


    What I'm trying to do is to provide multiple ranges from multiple sheets. E.g:

    'Sheet 1'!H7:H24

    'Sheet 2'!D5:D19



    The problem is that the VBA script seems to only allow one range at a time and I need to modify this to allow multiple ranges.


    For reference, I have attached a test Excel spreadsheet for you to play around with.


    HTML Code: 

    HTML Code: 
    Attached Files Attached Files
    Last edited by AliGW; 08-10-2021 at 01:20 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. script to run the macro from Vb script with out opening the excel file
    By chandanp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2021, 03:33 AM
  2. Need A Fast Script To Copy 80000 Cells But My Current Script Is Too Slow
    By Genus Max in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-20-2019, 09:54 AM
  3. calling the vb script from the shell script(unix platform)
    By chandanp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2014, 06:21 AM
  4. Integrating Mainframe emulator script with excel's vba script
    By Himanshu Mishra in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2012, 10:30 AM
  5. Create VBA script to short, dedicated button in excel for script?
    By realized in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2009, 11:54 PM
  6. Problem with VB script (noob!)
    By d3ell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2009, 06:49 PM
  7. Script that edits the text printed on the button that runs the script
    By petalred in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2008, 02:41 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