none
VB code to take info from a sheet RRS feed

  • Question

  • Hi

    I'm setting permissions to a number of sheets that based on a users level the sheets will be visible or XLveryhidden

    I have a list of the tables and the permission level i have assigned- now i'm trying to get the vb to show hide based on this list

    The first code works fine- sheets names are in Col HV- details of true or xlveryhidden is in col HX

    Can't get the bit after the = sign to work on the 2nd code- any ideas?

    Sheets("" & Sheets("List").Range("HV7").Value & "").Visible = xlVeryHidden

    Sheets("" & Sheets("List").Range("HV8").Value & "").Visible = Sheets("List").Range("HX8").Value

    Thanks

    David

    Friday, June 17, 2016 2:22 PM

Answers

  • Got it sorted

    Rather than the last bit referring to a cell with Text saying true,hidden xlhidden- if it refers to a cell with a number 0,-1,2

    then the code here works

    Sheets(Sheets("List").Range("HV8").Value).Visible = Sheets("List").Range("HX8").Value

    D

    • Marked as answer by David_1234 Friday, June 17, 2016 3:10 PM
    Friday, June 17, 2016 3:10 PM

All replies

  • Got it sorted

    Rather than the last bit referring to a cell with Text saying true,hidden xlhidden- if it refers to a cell with a number 0,-1,2

    then the code here works

    Sheets(Sheets("List").Range("HV8").Value).Visible = Sheets("List").Range("HX8").Value

    D

    • Marked as answer by David_1234 Friday, June 17, 2016 3:10 PM
    Friday, June 17, 2016 3:10 PM
  • Hi David_1234,

    its good to hear from you that you got the solution for your problem by yourself.

    thank you for sharing the solution with our community so that if any other member have same issue like you can also get solution by your post.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Saturday, June 18, 2016 12:15 AM
    Moderator