hi all
is there a way to hide a worksheet within a worksheet?
stan
hi all
is there a way to hide a worksheet within a worksheet?
stan
Re: hiding a worksheet
Hi
I didnt get your question...hide a worksheet in a worksheet
You can hide worksheets within a workbook
Aadarsh
Re: hiding a worksheet
hi
i meant that if there is a worksheet a, b and c
could i try to hide worksheet b and c in worksheet a?
ss
Re: hiding a worksheet
You can't hide a worksheet in another worksheet. The simplest way to hide a sheet is from the Format Menu | Sheet | Hide.
You can change a sheet's Visible Property using VBA, if you are competent with VBA use.
Re: hiding a worksheet
hi roy
i have a macro that automatic transfers data from sheet a to sheet b
if i hide worksheet b, when i execute the macro in sheet a, a debug error appears...
is the problem inherent or the code must be changed to accomodate hiding of sheet?
thanks,
stan
Re: hiding a worksheet
Quote from gazzapohDisplay Morehi roy
i have a macro that automatic transfers data from sheet a to sheet b
if i hide worksheet b, when i execute the macro in sheet a, a debug error appears...
is the problem inherent or the code must be changed to accomodate hiding of sheet?
thanks,
stan
hi gazzapoh,
i think the error appears as the sequence of the code is not proper
could you post yr code?
Re: hiding a worksheet
This can be done in this general way:
Turn screenupdating off,
Unhide your sheet B
copy data from sheet A
paste data to sheet B
hide your sheet B
Turn screenupdating on.
This whole sequence usually occurs so quickly the end user is completely unaware of what is being done.
Regards,
Re: hiding a worksheet
hi xlite
this is a code:
Sub inputsheet()
Dim SourceWS As Worksheet, TargetWS As Worksheet
Dim rData1 As Range
Dim c As Range
Set SourceWS = Sheet2
Set TargetWS = Sheet8
Set rData1 = SourceWS.Range("e:e")
For Each c In rData1
If c.Value = "x" Then
c.EntireRow.Cut
TargetWS.Select
TargetWS.Range("a999").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End If
Next c
End Sub
Display More
thanks
stan
Re: hiding a worksheet
hi Stan
see if the code below is what you're looking for
HTH
Sub inputsheet()
Dim SourceWS As Worksheet, TargetWS As Worksheet
Dim rData1 As Range
Dim c As Range
Set SourceWS = Sheets("Sheet2")
Set TargetWS = Sheets("Sheet8")
Set rData1 = SourceWS.Range("e:e")
For Each c In rData1
If c.Value = "x" Then
c.EntireRow.Cut
TargetWS.Select
TargetWS.Range("a999").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End If
Next c
TargetWS.Select 'select and hide target sheet
ActiveWindow.SelectedSheets.Visible = False
End Sub
Display More
Re: hiding a worksheet
hi xlite
the code works fine when the sheet is hidden,
as more "x" values are entered in the particular column, the code fails as the sheet was hidden, and the rows of data could not be pasted
user has to unhide the sheet, then the code works
is there a way to bypass the frequent unhiding process?
regards
stan
Re: hiding a worksheet
hi stan,
sorry abt that, i forgot to add an unhide
Sub inputsheet()
Dim SourceWS As Worksheet, TargetWS As Worksheet
Dim rData1 As Range
Dim c As Range
Set SourceWS = Sheets("Sheet2")
Set TargetWS = Sheets("Sheet8")
Set rData1 = SourceWS.Range("e:e")
Application.ScreenUpdating = False
TargetWS.Visible = True
For Each c In rData1
If c.Value = "x" Then
c.EntireRow.Cut
TargetWS.Select
TargetWS.Range("A65536").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
End If
Next c
TargetWS.Visible = False
Application.ScreenUpdating = True
End Sub
Display More
HTH
Don’t have an account yet? Register yourself now and be a part of our community!