View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pat67 pat67 is offline
external usenet poster
 
Posts: 48
Default code to unhide tabs based on cell contents

On Aug 25, 2:03*pm, pat67 wrote:
Hi, I have a large file with 30 some tabs. what i want to do is hide
all the tabs except a contents tab and be able to unhide specific tabs
based on which cell someone clicks in. I can do it by putting in this

Sheets("NC-41282").Visible = True
Sheets("NC-41282").Select

But i have to do that for each NC-Number. what I am looking for is to
do it so the vba knows whic sheet to open based on which cell is
clicked. So cell B4 for example shows NC-41283. I wanted so when that
cell is clicked the tab NC-41283 opens. C4 would be NC-41284 and so
on. I am obviously not really adept at vba so any help would be
appreciated. Thanks



Or better yet. Assign the code to a button that takes the info from
say cell B4 and says open whatever tab is in cell B4. that way they
can enter whichever they want