I created a workbook called "controlelijst.xls" using Excell 2007. In this workbook i created a sheet that i use as a template, it has conditional formatting all over it. That in fact is not the problem. I copy this template for every new issue i have.
The thing i would like to see happening now is when i enter the value "Y" in cell O10 that the active sheet on wich the value is entered becomes hidden. Because the reason for setting this value is that all conditions are met on this sheet and it does not have to be visible anymore unless i unhide it.
Using Excel 2007, I have a workbook with 7 sheets. The first one is a Navigation Page where I have checkboxes (form controls, not active X) with the names of the other 6 sheets. When the box(es) are checked, the sheet(s) become visible. I have accomplished this by assigning macros I recorded.
I need to now add the opposite: When the box(es) are unchecked, the sheets become hidden. From googling and looking for other threads/forums here, I gather that I need to add code/ VBA, but I know nothing about these at all.
I have an intern that is working with me, and I have a file that I need updated but one of the columns has confidential information so I would like to just hide & password protect this column this way he can't access/view this information but still have access to modify the rest of the spreadsheet.
I created an excel Calendar that has columns for months and weeks, and rows for hours of the day.
I have two drop lists one contains months, and one contains weeks.
Basically if you choose august from the first drop down list, all the rest of the columns that are not August disappear, and the sheet only shows august.
The second dropdown selects the week. If you choose week 1, it shows week 1 of this particular month. This second drop down is what I do not know how to make work.
This is the VBA code i used.
Private Sub ComboBox2_Change() Select Case ComboBox2.Text Case "May" Range("All").EntireColumn.Hidden = True Range("May").EntireColumn.Hidden = False
I do not know how to make the code or choose the categories so that It only shows the week of the month chosen in the first column. Will I have to name each and every group of columns for each and every month as May - Week 1, May - Week 2...... June - Week 1, June - Week 2, etc... or is this a way around it?
I currently have the following Macro for one of my many checkboxes in 2007 Excel:
It works perfectly until additional rows are added/deleted before the indicated rows in the code (It changes the number sequence in the workbook). The number sequence stays the same in the code which means I am now hiding rows either before (delete rows) or after (insert rows) the intended rows I want to be hidden. Is there a way to change the above code to remain with the assigned rows regardless of the adding/deleting of rows before it?
I have an Excel 2007 workbook which has five sheets in. I just wondered whether it is possible to hide all five of them when the workbook is first opened. Also I would like the user to be asked for a password when they wish to unhide a sheet, with the password being different for each of the sheets.
Is there also a way to do this which won't be affected by Excel disabling all Macros when the application initially opens.
In excel 2007, I have an embedded image on a sheet which I want to make it hidden by default. When someone hovers over a particular cell say cell B3, then image should be displayed below this cell (sort of hyperlinking) and when the cursor or activell cell is not in B3 it should be hidden again. What steps/technique/VBA code will make it happen ?
The workbook is called EA.xlsm, and contains dozens of charts, tables and pivot tables - all of which pull their data from external files in the same folder. In case it matters, the folder also contains a Word 2007 document which contains embedded charts form the EA.xlsm file and lays them out for printing.
My problem is that all of a sudden, when I try to open the EA.xlsm file, it gives me two consecutive error messages, as follows:
Microsoft Office has identified a potential security concern.
File path: c:My DocumentsEA.xlsm
Data connections have been blocked. If you choose to enable data connections, your computer may no longer be secure. Do not enable the content unless you trust the source of the file. [Enable] / [Disable]
to which I click enable, and then....
Microsoft Office has identified a potnetial security concern.
File path: c:My DocumentsEA.xlsm
Automatic update of links has been disabled. If you choose to enable automatic update of links, your computer may no longer be secure. Do not enable the content unless you trust the source of the file. [Enable] / [Disable]
to which I also click enable.
Excel then opens, but I just get the program with a blue screen. i.e. it looks like you have opened Excel, but not opened a file yet. However, if I try to close Excel, it asks me if I want to save changes to EA.xlsm, and if I try to open EA.xlsm again - it tells me that it is already open. Also, if I press Alt+F11 to open the VBA console - I can see the names of all of the sheet tabs in the file - but when I close the VBA console, it looks as though I do not have a file open again.
I suspect that somehow, somewhere the file is open, but I dont know what I need to do to be able to see/edit it. Or even worse - if it has become corrupt. It would take me about a month to put this file back together again from scratch.
I want to copy the header from a previous months report and paste it to a new workbook in Excel 2007. How can I write a macro to copy from a1 to g2, keep the same column width and all formatting, then open a new workbook (trouble now in that I previously selected book1 for the new one but this could chnage), and then paste this to the new workbook, and then save this to a location on my computer? So that's, copy, open new workbook, paste keeping all formatting and values, and then save.
I have a workbook (book1) that is modifying multiple other workbooks (book2). I need to do a vlookup of a sheet in book1 from a value in book2. I then need to insert the value found by the lookup into G7:H7 (merged cells) of book2.
value is in column B of page "Routes" of book1. Found by value B3:C3 of book2. The vlookup looks in column A of book1. The found value is put into G7:H7 of book2.
In a step by step, to possibly make this more clear:
1) check value of B3:C3 in book2 2) find value in Routes sheet of book1, column A 3) upon match, grab the value of column B 4) insert that value into G7:H7 of book2
1. Main (where I have a button and I intent to write code and paste the data)
2. Data (where I have data to be copied)
My code so far
Code: Sub copy() Dim wbData As Workbook Dim wbMain As Workbook Set wbData = Workbooks.Open("path") Set wbMain = Workbooks.Open("path") wbData.Sheets(1).Range("A1:A5").copy wbMain.Sheets(1).Range("A1:A5").PasteSpecial wbData.Close End Sub
In the above code the problem is that the file wbMain is already open and when I try to re-open it gives an error and program crashes and if I do not open the file then it gives me the error and says sub or function not defined as wbMain variable is not set.
Second problem:When an error is thrown or I close my files, I lose all the VBA code and module? strange ! how to save modules permanently? using Excel 2007
I have a file that has an original file format .xls
I saved as .xlsx (I am using Excel 2007) with a different name so I could make changes to the new file without changing the original.
That turn off compatibility mode.... but it is still "shared". While it is shared I cannot delete a sheet. In fact, I really don't even want it to be shared. If the file is open, and someone else opens it, I want it to open as "read only". I cannot uncheck the "Allow changes by more than one user at the same time. This also allows workbook merging." checkbox because it is greyed out.
I have a macro with "ActiveWorkbook.Protect Password:="password"" . It was working fine in excel 2003. In excel 2007, because of this I am not able to run any macro's in the workbook. I am getting a message "The macro may not be available in this workbook or all macros may be disabled. I can see a security warning in message bar saying macros have been disabled, but I dont have have a option to enable the macros.
Intention is to (automatically) fully protect each completed worksheet/workbook on "save"/"save as" in MS Excel 2007... Is this possible by means of a macro? Which one? Saving in a ".xlsm" format is required?
I am using Excel 2007. I'd like to merge multiple sheets (about 13) into one workbook. The sheets are placed in one folder, and they all include 2 sheets, - only the first sheet should be merged into the final workbook.
The sheets will be updated every 3 months and merged again (-thus replacing the old data).
Ok I am using Excel 2007. I want to copy 4 cells from a row on sheet 1 to sheet 2 based on value in first cell in row. Example if cell a13 > 0 then copy row 13, cells b13 thru e13 only to first available row in sheet two but starting from row 12 on sheet two. Because sheet 2 has title information at the top from row 1-12.
I would rather not have to use a button to do it, would like it to do it as data is entered in sheet 1.
ActiveX control? (=EMBED("Forms.ComboBox.1","") They are filled using named ranges on another worksheet and work fine. The problem happens when I share the workbook the combo boxes become completely non-functional. They don't even drop down when clicked.
In versions prior to Excel 2007, I was always able to copy a chart when I copied a tab. However, when I copy a tab in 2007, the data copies fine, but the chart does not. Something similar happens when I try to move a tab with a chart on it to another workbook.
I am having trouble making any formula references between 2 different workbooks.
For example, I being typing out my VLOOKUP function on 1 sheet, as soon as I get the table argument, I switch over to the other workbook in which the table is, and I no longer have the VLOOPKUP function active.
I am having this problem for any formula in which I am trying to reference this workbook.
I have ensured they are both saved as Excel workbook documents. I am using Excel 2007
I need to combine AHK and Excel, and in this I came up with the solution to save my parameters in a file, and let the workbook autoload it when I open the workbook. To do this I need to pass a command line parameter, or working directory to the workbook, as I will be using many different work directories for this to make sense.
This is only a matter of how to execute my workbook so that the path is included (and usable) to the working directory
I have tried
..workbook-name.xlsm /p "workdir"
But it results in a "grey" version of Excel aka. Excel is open, but no workbooks are.
I have also tried
excel.exe workbook-name.xlsm /p "workdir"
But this did not work either, and is not an option as we use both 2007 and 2010 at my workplace where this is intended to be used.
I can do it very easily by using absolute paths in the Excel auto-load, but as I have explained already this is just not an option.
I'm trying to build a workbook (2007) with multiple worksheets where each worksheet corresponds to a different query/dataset pulling data from the one database.
I would have expected that you could define the one data connection object and then specify the SQL that each worksheet table will invoke. The apparent structure of having the query coupled to the connection object is confounding me. I'm therefore trying to set up a separate connection for each of the worksheets and Excel is getting tied up in knots.
"How to create a 'main' macro to control other macros within a workbook". I have my individual macros created. There's one macro for each sheet that searches online data and returns the information. I have one of these per sheet (a total of 20 sheets) since I couldn't find a way to have all 20 macros be on one sheet and still work. My trouble is that whenever I'm on my 'main' sheet and try to run the macro which applies to a 'secondary' sheet, I get an error. I have to select the sheet first, then run the macro and it works. Below is the macro on each sheet.
VB: Sub Holding1() Dim DataSheet As Worksheet Dim EndDate As Date [code].....
I have the following code below for a timer in a userform. Right now it is configured to start when a button is clicked. I would like to have it automatically start the timer after the workbook is open for more than 5 minutes but so far have been unable to get it to do so. I have tried putting the code in the workbook module but it still won't run. It also has a button to reset the timer if they need more time in the workbook and also a button for them to save and close the workbook if they are finished. I'm running Excel 2007.
VB: Private Sub CBReset_Click() Dim T, E, M As Double, S As Double T = Timer Do E = CDbl(Time) * 24 * 60 * 60 - T 'elapsed time in secs M = AllowedTime - 1 - Int(E / 60) S = 59 - Round((E / 60 - Int(E / 60)) * 60, 0)