haseft

Active Member
Joined
Jun 10, 2014
Messages
321
Hi!

The below codes copy an unprotected sheet and copy it to a new sheet.
All codes works, but worksheet “Process” is still visible. I want it to be hidden at the end.
Please help!

HTML:
Sub Start()

Worksheets("Process").Unprotect Password:="abcde"
Worksheets("Process").Visible = True
‘some codes

Call Steg1
Call Steg2
Call Steg3

‘at the end of Sub Steg3 are below codes

Worksheets("Process").Visible = xlSheetVeryHidden
Worksheets("Process").Protect Password:=" abcde "
Worksheets("Process").Visible = False
---
End Sub
HTML:
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
select a different sheet then do the hide
 
Upvote 0
Solution
Adding the last line in your code is making your sheet "hidden" but not "very hidden" ... Just comment the last line of code

Code:
'
'
'

Worksheets("Process").Visible = xlSheetVeryHidden
Worksheets("Process").Protect Password:="abcde"
'Worksheets("Process").Visible = False
 
Upvote 0
I still ha the same problem.


Adding the last line in your code is making your sheet "hidden" but not "very hidden" ... Just comment the last line of code

Code:
'
'
'

Worksheets("Process").Visible = xlSheetVeryHidden
Worksheets("Process").Protect Password:="abcde"
'Worksheets("Process").Visible = False
 
Upvote 0
stepping through the code, does it complete to the end without error, it could be dropping out which means that bit of code doesn't run
 
Upvote 0

Forum statistics

Threads
1,215,053
Messages
6,122,882
Members
449,097
Latest member
dbomb1414

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