show hidden worksheet

LFKim2018

Active Member
Joined
Mar 24, 2018
Messages
267
I have a "VERYHIDDEN" worksheet named "prov" in a workbook and I want to show and browse it without editing option - just view - with the assigned keys > say, Ctrl + P or Ctrl + V to open it and after closing - the said worksheet to return to the original view setup (veryhidden)
how would the vba be written?
Thank you
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi LFKim2018,

Here are the two macros you need:

Code:
Option Explicit
Sub VeryHiddenUnhide()

    Sheets("prov").Visible = xlSheetVisible

End Sub
Sub VeryHidden()

    Sheets("prov").Visible = xlSheetVeryHidden

End Sub

Keep in mind that Ctrl + P is Excel's print option default while Ctrl + V is its pasting default. Assigning custom code to those shortcuts will stop that from happening which could confuse users who are used to using shortcut keys.

HTH

Robert
 
Upvote 0
Thank you for early reply
ok, so Ctrl+P & Ctrl+V are assigned --- say we use Ctrl+non-assigned letter or char
I would like to save this command to "the Workbook" vba - what could be the macro?
Thank you again
 
Upvote 0
You can run either macro from the Macro dialog (Alt + F8) or if you want to use shortcut keys perhaps Ctrl + Shift + A and Ctrl + Shift + B for the two macros.
 
Upvote 0
if it is not too much to ask for your help again
in the workbook I created for costing - it consists of several worksheets - and one of that is the template - it is worksheet protected but user can input data to it. But when I used Ctrl key and drag it to the right with mouse pointer at the sheet - it duplicated the worksheet even though it is protected - I would want to know if I can deactive this COPY SHEET function only for that specific sheet named "Form". using workbook protect would not do as it freezes all worksheets - the whole workbook for that matter.
what would be the macro for this..
Thank you very much
 
Upvote 0
Though you should start a new thread for each new question see if the code here helps.
 
Upvote 0

Forum statistics

Threads
1,217,407
Messages
6,136,425
Members
450,011
Latest member
faviles5566

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top