Unhiding Certain Sheets Upon Entering The Workbook...
Feb 24, 2009
My database has what I call the 'cover page'. On the sheet is a command button that will take the user to the next page. Basically what I want to do is upon opening the workbook, the user is taken to the cover page, and all the rest of the sheets remain hidden until they click a command button to 'enter' the workbook. P.S. I have some sheets that need to remain hidden though...
Of course the other way is just to have a userform that opens when the book is opened to do the same thing. Where would I put the code for the userform, in ThisWorkbook or a separate module?
View 2 Replies
ADVERTISEMENT
Sep 27, 2011
I have 25 sheets in the workbook and a combobox on the main page, The combobox references a range of 1-25 that represents the 25 hidden pages. right now i can get the sheets to unhide one at a time based on the selection e.g. combobox option 1 will unhide sheet 1 but the sheet are representing sites in a design so i need to have the option to select multiple sites in the combobox option so for example if i select 5 then sheets 1-5 should unhide. I hope I've explained that clearly.
The other question or option would be to just duplicate sheet 1 based on the combobox selection e.g. selection 5 duplicates sheet 1 5 times.
View 9 Replies
View Related
Apr 27, 2012
I would like to be able to hide the tab i am in and unhide another tab at the click of the button,
I have tried recording the macro myself and it works up to a point,
I want it to finish on the tab i have just unhidden but for some reason it doesn't seem to do that (even though that's the way i recorded it)
View 4 Replies
View Related
Jul 20, 2009
Regarding the age old problem of trying to ensure macros are enabled in a workbook, using the process of hiding all sheets bar one:
Automatically Close Workbook If Macros Are Disabled
Reafid inserts some excellent code so that worksheets are hidden BOTH before closing AND on a normal Save event (I have also attached Reafid's zip file with the workbook that includes his/her code).
Having done much searching it seems to be the best solution out there, however I can still break it fairly easily and I'm worndering if anybody can stop me doing the following to break it:
Open the file in its restricted state (i.e. only Warning tab shown, all other sheets very hidden) and NOT enabling macros on opening. I'm therefore at the position Reafid intended; macros are disabled so all sheets are very hidden. Then to break it, in my personal macro workbook I have a simple macro that unhides all worksheets in ThisWorkbook, I run that personal macro and everything in Reafid's file is unhidden.
Reafid's file therefore has been opened with macros DISABLED and now all worksheets are visible.
View 9 Replies
View Related
May 5, 2006
I have groups of data in A5:AW200 with various blank rows in between, and would like to be able to automatically hide and unhide (toggle) the blank rows, but only for those rows where cells in column A are blank.
I'd also like to hide those same groups of blank rows on Sheets 2-5, which are laid out exactly the same as Sheet 1, but since they contain cell references to and are mirrors of Sheet 1, certain rows on those sheets may appear blank, but in fact are not. (I should probably have separate buttons on each sheet, but not sure). I know Sheet 1 can be used to test for conditions (blanks rows) and translate the results to Sheets 2-5, but I'm not sure how to do it.
View 4 Replies
View Related
May 8, 2013
I have a macro that activates and copies data from a hidden workbook. The problem I'm having is that when the macro is done, the workbook is no longer hidden.
I used this code here to "re-hide" the workbook...
Code:
Windows("Macros.xlsm").Visible = False
...but now, everytime, it asks me if I want to save the changes to my workbook. I would like to copy a worksheet from this hidden workbook without having to worry about whether to save changes or not everytime I run this macro.
View 9 Replies
View Related
Jun 12, 2009
I search the web and found a few different instructions, however the all lead me to the same point. My unhide button is greyed out and not an option. The workbook is in the correct location on my machine, etc. For some reason I cannot unhide it and have it show in my VBA window...
View 9 Replies
View Related
Jun 27, 2013
I have the below VBA code associated with a sheet called "Select View". When the workbook opens there is another code that displays only "Select View", all the other sheets are hidden. In "Select View" there is a data validation list. Based on the selection the user gets to see only certain sheets. For example, if the user selects "Region 1" they see only the sheets "Region 1", "Panama City" and "Pensacola".
As you can see some of the names in the "Target.Value" are the same as sheets in an array. The ones that do are lead schedules, that is information from other sheets in an array roll into it. That is values from "Pensacola" and "Panama City" flow into "Region 1", the lead sheet.
What I am trying to do is finish the code where based on the "Target.Value" selected it automatically takes the user to the lead sheet. For example, when the user selects "Region 1" in the data validation it takes the user directly to the sheet "Region 1". The user of course can also see the other sheets in the array, that is "Pensacola" and "Panama City" and can manually select the tab to view or go into one of the later
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet
If Not Application.Intersect(Range("B10"), Target) Is Nothing Then
For Each sh In Sheets(Array("Panama City", "Pensacola", "Region 1"))
sh.Visible = Target.Value = "Region 1"
Next sh
[Code]....
View 6 Replies
View Related
Jan 4, 2013
I am trying to find code that will allow me to hide a set number of rows based on the value of a specific cell which I need to work for two worksheets in the same workbook. Is that even possible?
For example: when i enter 5 into cell D1, I need five rows to be visible on both sheets.
View 9 Replies
View Related
Jul 22, 2014
I have two tabs BIN QTY and ORDERS. On the ORDERS tab Column A is the order number and is duplicated several times depending how many line items are on the order. The second key is Column H which is the part number which is unique per sales order. I'm trying to use these two values to look up or find the matches on the Bin Qty tab.
-The data in Column A (order tab) gets compared to Column B (BIN QTY tab)
-The second match is the Item no. Data Column H (order tab) to Column C in (BIN QTY tab).
-Once both values match it needs to pull the value from column G (BIN QTY tab) and enter it in column N (ORDERS tab).
My example is highlighted in blue with the result in green. I've tried several different index and match formulas with no luck. my Last was
=IFERROR(INDEX('BIN QTY'!$G$1:$G$7957,MATCH(ORDERS!$A1,'BIN QTY'!$B$1:$B$7957,0),
MATCH($H2,'BIN QTY'!$C$1:$C$7957,0)),0)
MY ORIGINAL SHEET IS MUCH LONGER
View 3 Replies
View Related
Mar 18, 2014
I want to hide selected sheets and when i want to unhide them, ask for password to unhide the sheets.
View 10 Replies
View Related
Jun 16, 2014
I've already entered a variation of the formula below into 180 different columns. The only variation is where worksheet 322 is referenced. Each column references a different worksheet.
Formula:
I have at least four other tables to build of the same size, and they're each going to use this same formula with an additional IF formula housed around it. Ideally I would be able to copy the table, then run find/replace, where I could substitute = with =IF(new formula, and then run find/replace a second time and sub ))) with ))),more new formula). The problem of course is in between those steps lies a formula error preventing me from running the second step. The only alternative I can think of is to build the new formula, copy it into a word document, and run find/replace 180 times to tailor the formula for each column. That's what I did to build the first table.
View 8 Replies
View Related
Mar 7, 2014
i have a workbook that is doing a copy and paste between 2 workbooks.
the trouble i am having is every month workbook a changes to be the name of the current month and year workbook b never changes. so when a change in month happens the macro stops working due to new workbook name.
how could i have the macro reed the name of the work book and input that name into the necessary locations withing the macro.
View 2 Replies
View Related
Jan 9, 2014
I have 2 separate workbooks that are linked together and work in tandem. One is the Master Workbook "Master Business Plan Worksheet For Sale.xlsm" and the other is the one containing all the Menu Items for the business "Menu Items Workbook.xlsm"
I have a Master Recipe Sheet that I created in the Master Workbook and made sure it all works. Now I have copied it to the Menu Items workbook and copied all the Userforms and created Macros for it but I need setting up the references to the other sheet. I have included the code from the first sheet for you to look over. The textboxes all need to populate to the Master Workbook and all the info for the combo boxes are also in the Master Workbook.
Code:
Private Sub UserForm_Initialize()
'Populate Measurement combo box.
Dim rngMeasurement As Range
Dim ws As Worksheet
Set ws = Worksheets("Start Here Sheet")
For Each rngMeasurement In ws.Range("Sizes_List")
[Code] .....
View 1 Replies
View Related
Feb 2, 2013
My Workbook contains several UserForms in which employees will be entering hours and activities on a daily basis. In the UserForm, they select their department and enter hours for each specific type of work/activity that shows up for that department in the userform. They click the submit button and all the data (date, name, department, type of work and hours) is added to a database table in another sheet, which in turn feeds a number of reports.
I need to be able to have anywhere from 20 to 100+ employees enter their hours on a daily basis, many of them at the same time, all from different locations (within the network of the client's system), using the same UserForms.
We've experimented with Google Drive, but that seems not to be the solution. It kind of works, but is not secure (it installs a copy of the entire workbook on the users system and then synchs the data back to the server upon "save") and way too cumbersome. I've heard of SharePoint, but not every client has that installed (and frankly I don't know how it works).
View 3 Replies
View Related
Jun 30, 2013
I'm looking for a formula that will paste an entire row from sheet 2 into sheet 1 of the same workbook when only 1 cell is typed.
I am trying to come up with a property access log for my guards so when they enter a tag number from(sheet 2 column B) into (sheet1 column D) , it will auto fill sheet1 column C and E with the entries from sheet 2 column A and C.
View 8 Replies
View Related
Feb 18, 2014
I have a work sheet named "Main_List"...In column D starting with "D2" I would like to list worksheets that I would like to have printed via VBA.
The workbook has several hundred worksheets and I would like to list in column D only worksheets that I would like to print with VBA code.
View 3 Replies
View Related
May 30, 2014
Trying to create a new workbook from another open workbook, then copying all the sheets that aren't called "Summary" to that new open workbook and then saving it. I get a subscript error on this line:
[Code]....
View 3 Replies
View Related
Mar 24, 2012
I want to create a hyperlink to a sheet named "adsf"
I am currently in a worksheet named: "62b Arcus"
I want the hyperlink to be set by grabbing the name from another cell.
For example, In cell h7, I have the text: adsf
In cell g7, I want to place a formula such as: =HYPERLINK("adsf!")
Except, instead of this, I want: =HYPERLINK("h7!")
In this way, i want it to hyperlink to a sheet name based on the text that is in h7.
But neither of these formulas work. Both say the following: "Cannot Open the Specified File"
After reading up on this I have discovered that I must save the file and include the file name inside the formula.
My file name is: [Maintenance Color Codes of Houses - colour coded2.xlsm] =HYPERLINK("[Maintenance Color Codes of Houses - colour coded2.xlsm]adsf!A1","LINK")
This hyperlink actually works. Yet I have a problem. What if I rename the file. For this reason, I want it to grab the current file name using "filename". I have tried this by the following:
=MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))
This grabs the current file name "Excluding the text outside of the [ and ]. I was able to create this formula myself.
How come I can't replace the part with [ and ] =HYPERLINK("[Maintenance Color Codes of Houses - colour coded2.xlsm]adsf!A1","LINK")
with:
=MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))
These two formulas together would be:
=HYPERLINK("MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))adsf!A1","LINK")
I also want to replace the "adsf" part with a cell number such as h7. So that it says h7!A1","LINK") or in full:
=HYPERLINK("MID(CELL("filename"),SEARCH("[",CELL("filename")),SUM(SEARCH("]",CELL("filename")),-SEARCH("[",CELL("filename")),1))h7!A1","LINK")
This doesn't work either
I know that I have probably created a ridiculous formula for what I am after. I'm almost there but not quite. You may know something far, far more simple.
View 5 Replies
View Related
Feb 7, 2014
I am looking for a code that would copy the data from each worksheet in a given workbook and then paste to just one worksheet within a different workbook. The Sheet names are auto generated when I run this canned report but the naming structure is always the same...the first worksheet is named Repair Details and then the next sheet is named Repair Details_1, the next sheet is named Repair Details_2 and so on for every sheet in workbook. So I would like to copy all of the data(Headers to last cell) and then paste in a worksheet(ex: Master Repair Report.xlsx and the worksheet could be titled Master Repair Details) on a different workbook, then the next sheet would copy from the one under the header to the last record and paste to the same workbook. This process would repeat for every worksheet in the Repair Details Workbook and paste to Master Repair Details worksheet in the Master Repair Report workbook.
View 4 Replies
View Related
Jun 2, 2014
I wrote a code in unshared workbook and it works fine. But when i make it shared i get Run-time error '1004' Delete method of worksheet class failed.
The Deleting of worksheet only occurs once (when the new wb is created) so is there i can unshare and share it back when the process is complete?
View 3 Replies
View Related
Jul 16, 2012
I have been tasked with creating a macro which creates a new workbook wherein each sheet contains the information for one site from the active sheet. The active sheet already has the values sorted by the site such that all information needing to be copied from the active sheet into the new workbook is together.
I.E.
ATL
ATL
ATL
ATL
CEN
CEN
JCK
JCK
etc.
There are 8 different sites on the active sheet: ATL, CEN, DAL, HAR, JAS, JCK, VIS, NOV
The macro needs to find the range for all of the data of each site and copy/paste that data into a new workbook such that ATL would have its own sheet, CEN would have its own sheet, and so on. The data ranges from A:R.
So, for example, the macro would find that the last row with ATL in the "B" column is 6095 and would then copy A2:R6095 and insert that data into the new workbook under Sheet 1.
I had some code that I had adapted to select the range for each of them, but the code loops through the entire sheet (which is 44,307 rows long) for each site making it a quite clunky and very slow step in an even longer macro. Since the data is already sorted, I know there must be a way to have the macro stop searching when it reaches data not equal to the data the row before, however, my experience with VBA is limited, and I have been unable to find a solution. Also, the data does not have to be conserved after being sent to the new workbook, if that would speed up the macro.
View 5 Replies
View Related
Mar 31, 2009
I have a spreadsheet which has all the names of trips from a warehouse, the day that they operate (1,2,3 etc) and the job line allocated to each trip. It looks something like that:
A B C
DAYTRIPCUST
I would like to create a macro that will be creating 7 new workbooks and then in those workbooks as many sheets as the trips. In these sheets, the customers should be displayed.
How do I write it? I could not find how to have a "dynamic choice" in the macro. I.e. not to have the criteria as "1", "trips1" but to choose from the range of inputs that are available.
View 9 Replies
View Related
Feb 8, 2010
I have a problem with hiding and unhiding columns. Is there a way wherein I can automatically hide the row(s) if the cell = "N/A" and will unhide if it's not equal to "NA". see the attachment Im using excel 2003 btw. You can see in Sheet2 to that it contains the table for the student grades. "N/A" means that they are not enrolled on that subject. While in sheet1, What I want to happen is that you will select a student name and below, it will automatically display the grades of the student on their enrolled subjects only. So, those fields with "N/A" will hide and when I update the value of N/A it will unhide.
View 5 Replies
View Related
Nov 18, 2008
I'm trying to write VBA that will unhide all the rows in a designated range ("Apples"), except the first and the last.
I'm using this simple code to hide the range: ...
View 8 Replies
View Related
May 20, 2007
I have a spreadsheet that i would like to hide all columns from B:M and to select the column/s I want to unhide.
I would like VBA cose to do this or to set up a combo box that will allow me to hide/unhide specific columns....
View 9 Replies
View Related
Jun 6, 2007
I am very new to this forum so this probably has been covered (although I searched but didn't see it.
Anyway, I am trying to figure out how to unhide multiple tabs instead of one at a time.
View 9 Replies
View Related
Sep 27, 2007
For data validation lists B27 to B30, if any of them is equal to "EBS via ULL" then unhide rows 31 to 42.
If any of the data validation list not equal to "EBS via ULL" then unhide row 44 and hide rows 31 to 42.
If "EBS via ULL" and any other product in the lists is selected, unhide rows 31 to 44.
If validation lists B27 to B30 are all equal to "Select Product..", then hide rows 31 to 44.
I would like to use the worksheets_change event.
View 9 Replies
View Related
May 8, 2014
see the sheet attached. To put into context, I am a teacher and want students to work on tasks, and have the answers to those tasks available to them but hidden, until a give them a password that unhides it.
On the attached document, Lesson1! K35:Q41 i have some answers to the task beside it in B35:H40. I want to hide these answers in some way (without affecting the columns as there is data above) and then when I want students to see the answer I give it to them and they enter it into L43 in this example. At this point the answers are revealed and stay revealed for revision purposes.
This will be repeated using different passwords for different tasks throughout the workbook e.g. L52 will be a different password revealing the answer in K48.
View 6 Replies
View Related
Jan 29, 2009
I have columns A to N hidden and need to reveal them. I know you can manually drag each one to reveal it. But I thought there was a way through highlighting/menu options to reveal them all instantly.
View 3 Replies
View Related