The code does exactly what I want it to do, but when Sheets 2 and 3 are hidden images of what is being pasted briefly flash up on the screen. Is there a way of avoiding this? The amount of data in the whole sheet is quite large (about 4MB), could it just be that the program is running too slowly?
I am trying to format all cells on all sheets (hidden or otherwise) as "Locked" so when the sheets are protected the user can't see the formulas. This macro individually selects every sheet in the book and applys the formatting. Is there a way to modify this code to accomplish the same thing without having it actually select every sheet? The only reason it is an issue is that after running the macro you end up on the last sheet in the book.
I have a large workbook in which each sheet contains either a single table (large or small) or a chart (various types and sizes). Some of the sheets also contain imported icons and shapes. I wonder if it is possible to export each of these worksheets as separate images? The macro should be able to set the boundaries of a table or a chart to export (either itself or by using the coordinates which are given in two cells – eg. A30=A1, L1=F8). Actually all tables and charts will always start at A1.
Ideally it should just take the coordinates of a range to be exported from single cell (eg L1=F8) - the fist being always A1 - so as to minimize the probability of it getting the boundaries wrong. I have attached the sample worksheet with a few tabs.
And yes - each worksheet image would need to be saved with the name of the worksheet.
I have a 15 sheet spreadsheet that has many formula and results that are obtained from a "Master Sheet." I want to hide the "Master Sheet" from users view.
When I do so the formulae can't find the info they require. How do I hide a sheet so that users can't see it, but the formula from other sheets can still access it?
i've an excel file where a final presentable sheet is linked to some hidden sheets which i dont want the user to see. Thru VBA, i'm performing some format related stuff in those hidden sheets, using: Sheets("Historical1").Visible = True. later, VBA sets it back to FALSE. But, i want to get rid of this hiding/unhiding, if its possible. My code has the following structure:
Sub tame_blph1() Sheets("Historical1").Visible = True Sheets("Historical1").Activate Dim coll As Integer Dim startcoll As Integer Dim endcoll As Integer startcoll = 25 endcoll = 124 For coll = startcoll To endcoll Step 2 If Len(selection) > 0 Then Call Macro1 Next coll Sheets("Historical1").Visible = False Sheets("Table").Select End Sub
In other words, can we perform the above without hiding and unhiding the Sheet called "Historical1"
I have a worksheet with 28 sheets. I want the first sheet to be the only sheet displayed when opening the file and then want people to have the ability to click a hyperlink to unhide a particular sheet. Then when they go back to the main page (via another hyperlink), the sheet that was unhidden will be hidden again. I was able to put together some code from [URL]. When I click on a hyperlink on the main page, I get a "Subscript out of range" error and it highlights Sheets(strSheet).Visible=True from the Worksheet_FollowHyperlink code. I made a basic spreadsheet with just 3 sheets and plugged this code in and it worked fine so I'm not quite sure what the error is. I attached the spreadsheet I'm using.
I have been sent a workbook which contains a number of formulae that reference hidden worksheets (see attached JPEG).
I cannot work out how to display these sheets? The workbook does not seem to be protected, I can edit and save the visible sheet. Can anyone shed some light on how to view the referenced sheets?
I have a total of 15 sheets on my excel documents. I've hidden 10 (5 sheets will be shown) of those sheets so i can hyperlink to them from the sheet called "The plan". The name of the hidden sheets are called:
I just came across file that needs to be cleaned up. Problem is, the main summary references more than 50 hidden sheets for pay periods dating back to 2011.
I want to make everything values from previous pay periods then get rid of the hidden sheets.
ive got a macro which works with data on hidden sheets within the workbook - when i hide the sheets the macro gives errors and will not run. when i unhide the sheets everything runs fine!
I have 5 sheets in a workbook. Three are hidden. My code allows user to make as many copies of the hidden sheets as needed and place them at the end by means of a macro button. This works fine, but after multiple copies (4 to 15) it crashes! Don't know what I did wrong.
I tried to Google this question but cannot find the answer. What is the maximum number of worksheets that Excel can hide within a workbook? I have a macro which hides all worksheets with the exception of the active worksheet and it has never failed. But this morning I had started working on a workbook containing many sheets and when I ran my HideSheets macro a maximum of 14 sheets hides every time. Is it my code (see below)?
I want this macro to run when I select sheet1 so I have dropped the code into sheet1. The macro runs fine as a stand alone but I get a 1004 protection error when placed into the worksheet module. Sheet "data2" is unprotected. I have tried "calling" the macro from the sheet1 module but it loops. I know it's simple but it's kicking my ***. data2 is hidden and workbook is unprotected as of now.
I'm trying to create a userform that allows the user to swap sheets from visible to hidden status. I've made it to the point where all the sheet names are populated based on their current status in their respective listbox, but I am stuck on using the results of any swaps to newly set their visible property. the code I have in the userform is as follows:
I have to review work papers with 50+ sheets. The users often hide the sheets they do not use. As part of my review I have to review all sheets, even the hidden ones.
What I would like to achieve:
To create a list of all hidden sheets with hyperlinks so I can go directly to the hidden sheet. This would be the same as a table of contents but for hidden sheets.
Is there a way to use a userform and hidden sheets at the same time?
I want to limit the access to the information through a userform but my userform requires me to unhide the userform to show. Is there a way to go around this? Because the information might be misused if the user can simply close the form and have access to the information in the sheet.
I have spreadsheet with 13 sheets the first of which is a title page, what I wish to do is hide the other twelve sheets and somehow be able to select them from a drop down box (or similar what ever works with a macro)on the front page, the selected sheets would then appear unhidden.
I am OK with formulas etc but macros are beyond my ability even trying to follow examples & tutorials online has me lost.
The sheets all have specific but different names and none need to be selected more than once (although if possible it would be good). I understand where to put the macro in but as to how it is written ......
I downloaded a cool add-in from XL-Logic that lets you select sheets to print. It's great, except that I need to print very hidden sheets and it does not display very hidden sheets. Does anyone know how to modify this code so it will list all sheet including very hidden sheets? And is there a way to make the sheets appear in alphabetical order? I've tried to play with it, but I don't know enough about VB....
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.
I am using some VBA I found here to password protect a hidden sheet. It works perfectly for 1 sheet, but I am trying to hide 6 but am having problems. Under the HideSheets part I've modified it fine, by using
Sub HideSheets() 'Set worksheet to Very Hidden so that it can only be unhidden by a macro Worksheets("Confidential1").Visible = xlSheetVeryHidden Worksheets("Confidential2").Visible = xlSheetVeryHidden Worksheets("Confidential3").Visible = xlSheetVeryHidden End Sub.........
I was playing with some codes on hiding and unhiding the sheets and then I tried this code to hide a sheet but then I decided to delete the code and the module after. The problem now is I can't unhide the sheet. Even the Insert/Rename/Delete sheet option when I right click it are all disabled.
VB: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Sheet2.Visible = xlSheetVeryHidden Me.Protect ("password") End Sub
OR can I? I get a "Run Time Error '1004' Select Method of Worksheet Class Failed"
Is there anyway around this?
Basically all the sheets are hidden from the user except for the Entry sheet. They input there data on there and then they press a send command button which then needs to copy that information to a hidden sheet. This is where the problem occurs.. Thought maybe their was a way around that or do I need to unhide the sheets during the macro and then rehide them again?
I have a macro that copies 2 worksheets of an open workbook "Combined Sales Tool" and saves those 2 sheets in the root of the C drive with a variable name.
I want to know how I can #1 close the newly created workbook, #2 focus back to the original workbook "Combined Sales Tool", hide the 2 sheets that were copied to the new file, then close the original workbook with (and for example without) saving
part of my code below:
Sub esummary() Dim OutApp4 As Object Dim OutMail4 As Object Dim cell As Range Dim filedoc As String Dim intFreeRow Dim emailatt4 As String
I am currently working with a hidden sheetname "hide_template" which contains formula linking to another sheetname "rawdata" of same workbook.
In this "rawdata", the contents is updated from time to time.
The problem is when I open this workbook and update the entries in "rawdata", the formulas/results in "hide_template" is not updated and invalid (ie. #N/A, #VALUE..)
This is the overview of process that Im working with:
===> open workbook ===> paste new entries on "rawdata" ==> run a macro to copy range in the "hidden_template" to paste to new sheet of same workbook
I already have a working macro to copy range from the "hidden_template" which works as follows:
===> set to visible the "hidden_template" ===> copy range from "hidden_template" ===> paste to new sheet ===> set to hidden the "hidden_template"