ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sheet / Hide & Unhide for editing only (https://www.excelbanter.com/excel-programming/332549-sheet-hide-unhide-editing-only.html)

thom hoyle

Sheet / Hide & Unhide for editing only
 
Using a vba with a Macro,
How would I go about UnHiding a sheet for editing, then when editing is
complete, HIDE the sheet back.

My objective is to allow users to add to a listing, then when editing is
complete the workbook returns back to the activesheet and hides the other.
Possible? ..

thanks

K Dales[_2_]

Sheet / Hide & Unhide for editing only
 
Very possible... with the only question being how you want to activate the
macro and how the user will let Excel know they are done editing. But this
would be the code to make the hide/unhide a sheet and to activate a sheet:
Worksheets("SheetName").Visible = True/False ' True to unhide, false to hide
Worksheets("SheetName").Activate ' to set the active worksheet


"thom hoyle" wrote:

Using a vba with a Macro,
How would I go about UnHiding a sheet for editing, then when editing is
complete, HIDE the sheet back.

My objective is to allow users to add to a listing, then when editing is
complete the workbook returns back to the activesheet and hides the other.
Possible? ..

thanks


bhofsetz[_67_]

Sheet / Hide & Unhide for editing only
 

Use a combination of the visible property

Sub StartEditing
'Trigger to let user edit sheet
Worksheets("Sheet1").Visible = True
End Sub

'User edits sheet

Sub DoneEditing
'Trigger when user is done editing sheet
Worksheets("Sheet1").Visible = False
End Sub

You'll need some action that the user takes which will trigger the
sheet's visible property to be set to True and then some way to know
when they are done editing the sheet and set the visible property back
to False.

HTH


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=381321


thom hoyle

Sheet / Hide & Unhide for editing only
 
Excellent, yes. I used both suggestions.
I simply put a CommandButton to HIDE the sheet on the Active sheet being
edited.
Then used a commandbar Popup to access the UnHide / Activate of the sheet.

thanks for replies.
thomas

"bhofsetz" wrote:


Use a combination of the visible property

Sub StartEditing
'Trigger to let user edit sheet
Worksheets("Sheet1").Visible = True
End Sub

'User edits sheet

Sub DoneEditing
'Trigger when user is done editing sheet
Worksheets("Sheet1").Visible = False
End Sub

You'll need some action that the user takes which will trigger the
sheet's visible property to be set to True and then some way to know
when they are done editing the sheet and set the visible property back
to False.

HTH


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=381321




All times are GMT +1. The time now is 07:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com