+ Reply to Thread
Results 1 to 4 of 4

active sheet name from value and "autohide" code do not work together

  1. #1
    Registered User
    Join Date
    03-15-2019
    Location
    Kaunas
    MS-Off Ver
    from 2003 till 365
    Posts
    2

    active sheet name from value and "autohide" code do not work together

    Hello,
    i have quite a problem. I use #codeA to change sheet name with value in specified cell (to has automatic changing value in header of each page). it works.
    i added some code to autohide specific rows (lets say rows 11-15 in SHEET A) by specified cell value in other sheet DATA ("yes or no"). it works.
    i put both codes together, nothing works. is it because of changing name of sheet A, and then "autohide" code doesnt catch correct sheet? please help if anyone can, i quite new to vba and dont know hot to solve this... dont have any code for the moment for autohide code


    #CODE for changing sheet name (found in vba forums; working)

    Private Sub Worksheet_Change(ByVal Target As Range)
    Set Target = Range("G5")
    If Target = "" Then Exit Sub
    Application.ActiveSheet.Name = VBA.Left(Target, 31)
    Exit Sub
    End Sub

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: active sheet name from value and "autohide" code do not work together

    It would be better to provide the full code that is having problems so we can see what is wrong. I would be surprised if the sheet name changing has anything to do with "not working". Unless you have coded the name into the VBA
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    03-15-2019
    Location
    Kaunas
    MS-Off Ver
    from 2003 till 365
    Posts
    2

    Re: active sheet name from value and "autohide" code do not work together

    i was trying that for autohide, this version a bit a mess after i tried to work them both at the same time:

    testA
    Please Login or Register  to view this content.
    testB (here "pav" was stated for naming the name changing sheet)

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: active sheet name from value and "autohide" code do not work together

    Test A and Test B are not for the same ranges, and also, one is a change event, the other a calculate event.
    Maybe it is best to explain what you wanted to achieve with both the hide and the rename criteria. I assume they are to apply to the same sheet?

    Is "Data Input" the sheet that has the code in it?

+ 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] Worksheet Event to Autohide all Rows that have a blank or zero "value". Ignoring formulas.
    By xlyfe in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-30-2018, 12:51 PM
  2. [SOLVED] Code that copies row of data to another sheet based on text "Complete"/"Delete"
    By Dremzy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-20-2014, 05:51 PM
  3. Replies: 2
    Last Post: 04-20-2014, 11:18 AM
  4. Replies: 5
    Last Post: 03-06-2014, 03:08 PM
  5. Replies: 3
    Last Post: 01-02-2014, 02:15 PM
  6. [SOLVED] Macro to look up and down from the active cell, copying the active "section" of the sheet
    By mikkola in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2013, 07:21 PM
  7. Replies: 2
    Last Post: 06-07-2011, 09:16 AM

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