+ Reply to Thread
Results 1 to 9 of 9

Hiding/Unhiding cells using vba

  1. #1
    Registered User
    Join Date
    06-30-2008
    Location
    birmingham
    Posts
    4

    Hiding/Unhiding cells using vba

    Hi All,

    Can anyone advise, I have not really done a lot of programming in excel. I have an excel sheet which is used a take off list for a mchine which as a number of variations.
    My first problem which i managed to solve was turning off a particular set cells if the machine size was any size other than 1750.
    My next problem is I want to create another one which will turn off cells if the value in a another cell says yes or no. Can anyone Advise.

    Vba Script so far:
    Please Login or Register  to view this content.
    Last edited by royUK; 06-30-2008 at 05:17 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Welcome to the Forum, please take the time necessary to read the Forum Rules & in future follow them. I will add Code Tags for you this time.

    You can only have one WorkSheet_Change event per worksheet, you need to combine thisa code.
    Last edited by royUK; 06-30-2008 at 05:18 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try something like this
    Please Login or Register  to view this content.
    I would have thought you would need to unhide any previously hidden rows as well.

  4. #4
    Registered User
    Join Date
    06-30-2008
    Location
    birmingham
    Posts
    4
    Thanks for your reply. Have tried the code but does not do anything within my excel sheet.
    As for unhiding other cells. I want to use the takeoff sheet that will allow me to produce a takeoff list for variations of the machine. Once I get this section of the code to work i will also hope to add additoinal repeative lines of code for more varations based on a yes or no input. Thanks again.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I can't test this because i haven't got your workbook, you can attach it here.

    Are you sure that you have placed the code in the correct place?

  6. #6
    Registered User
    Join Date
    06-30-2008
    Location
    birmingham
    Posts
    4
    Hi Managed to get the first part of code to work still having troubled with the yes & no part of hte code to do anything. I have attached Workbook. Again Thanks for your help.
    Attached Files Attached Files

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is this working how you want?

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    06-30-2008
    Location
    birmingham
    Posts
    4
    Thankyou, it works fine now.

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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