If A Range = 0, Hide Sheet
Dec 21, 2007If Range A1:a10 On Sheet 1 = 0, Hide Sheet 1
Anybody Know The Code To Do This In Vb?
If Range A1:a10 On Sheet 1 = 0, Hide Sheet 1
Anybody Know The Code To Do This In Vb?
I have about 100 products and each has its own sheet that I fill with data. Once I have finished with a sheet I rename it and create a copy and then hide the original and delete the entered data from before and start over.
Is there a way I can make it so when I hide a sheet it will automatically create a copy and delete a specific range?
I have a userform which clones the latest sheet and produces copy of it on the next sheet. The first sheet they will be cloning is the sheet called 'template', I however want this to be hidden since I do not want anybody to modify a sheet which basically serves purpose of a template. And once cloned, it is no longer needed.
On the click of the command button, the macro will create sheet1 taking the info from sheet named 'Template' in the same workbook . And now on the next click of the command button, Sheet 2 is created taking the info from sheet1 and Sheet 3 is created taking the info from Sheet 2 and so on. Here is what I currently have, so how can i modify it in order for my scnerio to work?
To select the last sheet in the workbook
Code:
Sheets(Sheets.Count).Select
To create new sheet
Code:
Sheets(Sheets.Count).Copy After:=Sheets(Sheets.Count)Sheets(Sheets.Count).Name = MyEvent & " " & MySCN & "(" & ThisWorkbook.Sheets.Count - 2 & ")"
I have a sheet named SEND FORM that has some info that I would like for the user to see for about 10sec when he opens the work book and then it will hide and show the sheet they will be working in named STOCK CUTTING FORM.. Also is it possible to have the 10 sec timer to be shown in cell L12 in the SEND FORM sheet... I already have a couple of things in my open event which are below
Code:
Private Sub Workbook_Open()
Call RunOnTime
Call ShowMsg
End Sub
is it possible to hide a sheet automatically if i select the other sheet. For example, I have sheet1, sheet2 and sheet3, I'm at sheet2 and if i select the sheet1, sheet2 and sheet3 will automatically hides.
View 4 Replies View RelatedI'm right now trying to find a way to hide a tab sheet if a cell in another sheet equals a certain value. I cant seem to find the macros for this?
Basically,
If Sheet1 cell A1 = "No" then hide Sheet 2
can a macro hide a worksheet if a cell in the sheet that I want hidden has a certain value?
View 9 Replies View RelatedI have a sheet, call it summary, that I need filled out if a value on it in A1 is not 0. Summary is linked to other sheets and inputs on those other sheets makes A1 change. So what I am looking for is a way to make summary appear if the value of A1 <> 0. If A1 goes back to 0 I need summary to hide itself again.
View 9 Replies View Relatedi have a main.xls file and two data file dat1.xls and dat2.xls
mail named file have ar - br- cr- dr- er -fr sheets
dat1 named file have ar-br-cr sheets
dat2 named file have dr-er-fr sheets
and all this files data source is
colomn source a - fd
row source 29-4000
i want to make two commandbutton to main file first for dat1 second for dat2 file and i need a code to use at this buttons to make
when dat1 and dat2 close
main file user when click first button
copy dat1 file ar sheet colomn source a - fd row source 29-4000 cells to main file ar sheet colomn source a - fd row source 29-4000 cells
copy dat1 file br sheet colomn source a - fd row source 29-4000 cells to main file br sheet colomn source a - fd row source 29-4000 cells
copy dat1 file cr sheet colomn source a - fd row source 29-4000 cells to main file cr sheet colomn source a - fd row source 29-4000 cells
i am using hyperlink in sheet 1 name history and sheet 2 name advance sheet 3 total progress..i want to hide the tab for selection by mouse.how to hide this tab,so user will click only the button that hyperlink.
View 3 Replies View Relatedi want to hide my sheet if A1.value = 0(zero) and if unhide the sheet if A1.value = greater than 0(zero)
View 11 Replies View RelatedI have been reviewing various methods of doing this and I had one that worked and for some reason it has now stoped?
The Code is:
Sheets("BCDashbd").Select
Sheets("Main Dshbd").Visible = True
Sheets("BCDashbd").Select
ActiveWindow.SelectedSheets.Visible = False
This is activated by using a button on the BCDashbd Page. I want it to hide the BCDashboard sheet and Unhide the Main DshBd Sheet. Currently it opens the Main Dshbd sheet but does not hide the BCDshboard Sheet?
What have I missed?
I'm trying to protect a sheet so that it can be unhidden only if you know the password.
This is because I have a macro that updates some of the cells and there are some people (and only those) that should be able to access it quickly and easily. -> can't use VeryHidden or cell lock.
I'm looking for VBA code that will:
Hide a sheet whenever it is not the active sheet
I'm trying to hide columns M:R on sheet "1up" if cell N4 on sheet "Fill In" is blank and unhide those columns if N4 contains an "X". Columns AK:AP should also hide or unhide on "1up" if AD4 is blank or not on "Fill In".
I've pieced together the below code by recording macros and piecing together code I've found in other threads on here. I placed the code in Sheet 1 (Fill In).
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("N4").Valuse = "X" Then
Sheets("1up").Select
Columns("M:R").Select
Range("M7").Activate
Selection.EntireColumn.Hidden = True
End If
Sheets("Fill In").Select
Range("N4").Activate
If Range("N4").Valuse = "" Then
Sheets("1up").Select
Columns("M:R").Select
Range("M7").Activate
Selection.EntireColumn.Hidden = False
End If
Sheets("Fill In").Select
Range("N4").Activate
End Sub
How do you hide a sheet?
View 6 Replies View RelatedHi. Does anyone know a formula to copy a selected range of cells on sheet one to a range on sheet three when a check box in checked. Ex. copy range a4:j4 on sheet one into a4:j4 on sheet three once the check box for on sheet one is checked?
View 9 Replies View RelatedI have a some data in 1st column in which most of the data has decimals. For ex. 209.8, 224.4 like this. I have converted it by roundup function and get the exact result. I want to hide the decimals means not show decimals. Only the result will show like. 210, 224 etc. For your reference I have attached the sheet. I have manually typed this in the C column result area. That I need in A column.
View 9 Replies View RelatedI have a challenge in excel functions, I need to save a file as common folder but in that workbook have multiple sheets need to show the sheets as per the user name on system other sheets want to hide with password protect,
example,
file name:- Report
Sheets:- A,B,C,D
if now using system user name is A then need to show only "A" sheet, other sheets want to be hide and the same for all.....
I want to hide & unhide columns using only (plus minus) button which is appearing on top of current sheet. I have couple of files with that options built in, but I dont know how to do it. I tried to see macros but appears that there is no macros at all in that file??
View 3 Replies View RelatedI've stored all my on-line passwords (about 50 of them) in one sheet in an Excel workbook. I want to protect it so that if somebody somehow got access to it, they couldn't see the sheet, much less change anything.
I tried Tools/Protection/Protect Sheet and Tools/Protection/Protect Workbook, using a secret password. Then, nobody could change the data -- but they could still see it.
So then I hid the columns first, and then protected the sheet -- which did the trick. But that seems pretty cumbersome, because it involves two steps for me to open it up (unprotecting and then unhiding).
Is there a way to protect/hide in just one step so my sheet of passwords can't be seen by an intruder?
I have a table on a sheet and you can select/filter some rows. The problem is that on the right i want to have some results with macros etc.
So I have to place everything well above the table because when you filter, rows are hidden and everything is messed up. Is there a way to "separate" the right part? So that when I hide/show rows on the table, it is not affected?
code:
Private Sub Worksheet_Change(ByVal Target As Range)
With Sheets("Sheet2")
Select Case Target.Address(False, False)
Case "B12"[code].....
I need to change it so that it hides a range of rows, say (6:26) instead of adding a line of code for each of the rows from 6 to 26 that I want to hide
Also how can I go about hiding the same rows on 5 more sheets, can I add more sheetnames after "Sheet2"?
I need a code to hide and unhide 6 Active=X Listboxes on sheet 2.
I need to link this to a Active=X Commandbutton.Can the commandbutton caption say hide/Unhide listboxes when selected.
With first code user selects a sheet from drop down and that sheet is activated. (This works fine)
Now hide all other sheets is what I'm trying to do with the second code. (This IS NOT working)
I assume I can either put the second code in the change event code or call it from the change event code once it works.
Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address "$A$1" Or Target.Cells.Count > 1 Then Exit Sub
[Code].....
I wanted to force the user to "enable macros." Searching online brought me to the method of hiding all sheets but one and only un-hiding the important sheets if the user accepts macros. This is done with event procedures as shown below ( I stole this code from a webpage and only added unprotect/protect workbook and made the Hideall and Showall subs private also since I don't want the user to have any idea what's going on):
The code below starting with BEGIN works but my problem is I need to add some additional stuff to the WorkBook_BeforeClose procedure. What I added to the BeforeClose procedure is a series of IF statements that follow this form:
If IsEmpty(Range("C9").Value) = True Then
MsgBox "Please enter data in this Cell C9", vbExclamation + vbOKOnly, "Validation"
Cancel = True
End if
The problem occurs if the User attempts to close without entering the required data. This will correctly trigger the above IF statements as desired. However, after Canceling, if the user decides to Save (without closing, by say clicking the floppy disk button in the upper left), then "HideAll" is executed which I do not want. I assume this is because bIsClosing has been set to TRUE and was never reset after the IF statements triggered a Cancel? Is this correct? How can I fix this? I tried adding a bIsClosing = False line at the end of every IF statement, but I think that just made things more screwy.
BEGIN
Private Sub Workbook_BeforeClose(Cancel As Boolean)
bIsClosing = True
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Cancel = True Or bIsClosing = False Then Exit Sub
Run "HideAll"........................
I want to hide a sheet and I can do that. However, what I want to do it that when the user wants to view the sheet I just hid, he has to unhide and then enter a password. Right now tthere is no password.
View 9 Replies View RelatedIs it possible to have a code that will hide a specific sheet everytime I will close the workbook?
View 3 Replies View RelatedI have a login page for my spreadsheet however a user can simply view the code to get the login username and password.
View 2 Replies View RelatedI have a speadsheet that has 27 columns for time entries, however employees seldom need to use more than the first 12 columns. I need to protect the sheet but would like the employees to be able to Unhide the columns when they need to use them, then reHide them. I can't find this as an option in either 2003 or 2007.
View 2 Replies View Related