excel-2010

How to get the last modified file in a directory using VBA in Excel 2010

只谈情不闲聊 提交于 2019-12-04 03:43:52
问题 Im looking for a way to do this in Excel 2010 using VBA. It used to be possible in Excel 2003 using the Application.FileSearch method, but this has be depreciated. (see below) Dim sFileName As String sFileName = "" With Application.FileSearch .NewSearch .LookIn = sDir .Filename = "*.*" .Execute msoSortByLastModified, msoSortOrderDescending If .FoundFiles.Count > 0 Then sFileName = .FoundFiles(1) End With Any ideas how to do this in Excel 2010? Thanks 回答1: If using the FileSystemObject is

XlFileFormat for excel 2010 file

隐身守侯 提交于 2019-12-04 02:41:36
I want to create a excel 2010 file from C# so what will be the XlFileFormat Enumeration for it. http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.xlfileformat.aspx xlOpenXMLWorkbook for a .xlsx macro free workbook. xlOpenXMLWorkbookMacroEnabled for a .xlsm macro enabled workbook. The key piece of knowledge is that the new Office 2007 file formats are called Office Open XML . 来源: https://stackoverflow.com/questions/7362552/xlfileformat-for-excel-2010-file

Open New Instance of Excel 2010 with every file [closed]

爷,独闯天下 提交于 2019-12-04 02:41:22
I am using Excel 2010 and want to manage a large Excel files. So I would like to open a new Excel Instance when opening every file from my Windows Explorer. At the point all files are opened in the same Excel Instance. Any assistance is kindly appreciated. John. [ I fould this: http://www.online-tech-tips.com/ms-office-tips/how-to-open-a-new-instance-of-excel-2007-workbooks/ ] Go to a folder in Windows Explorer, then Tools -> Folder Options , then the File Types tab. For each of XLSM, XLSB, XLSX, etcetera, select it, then click Advanced , select Open in the Actions list, then click Edit .

Excel 2010, how to keyboard shortcut to filter dropdown checkboxes?

北慕城南 提交于 2019-12-04 02:17:45
For Excel 2010, when I have the filter drop-down open ...how do I get to the filter checkbox section via keyboard shortcut? Skipping everything from "Sort A to Z" to the "Search" box, going all the way to the checkboxes. Quickest Option: e ↓ In Excel 2010 (English) you just have to press e to get to the filter textbox; from there you can use the down arrow key ↓ to go to the first checkbox: Alternative Option Shift + Tab Shift + Tab Shift + Tab (as mentioned by @Sean_Cheshire) - this goes "backwards" from the first entry over "Cancel" and "OK" to the first (sic!) checkbox. Related Question:

Excel ActiveX Listbox not enabled on file open

a 夏天 提交于 2019-12-04 02:16:19
I am trying to figure out a bizarre situation. I have a workbook with many sheets. On one sheet, I have one ActiveX listbox (CTOverview.Listbox1). On a second sheet, I have a total of three listboxes (CTSelected.Listbox1 thru Listbox3). I am using a query to populate Listbox1 on both sheets with the same data. The code for this is below: strSQL = "Select Distinct [Region] From [UniqueCTList$] Order by [Region]" closeRS OpenDB ' initialize listboxes CTSelect.ListBox1.Clear CTSelect.ListBox2.Clear CTSelect.ListBox3.Clear CTOverview.ListBox1.Clear ' initialize with entire division value CTSelect

Change Cell Reference between Absolute and Relative

爷,独闯天下 提交于 2019-12-03 22:36:13
问题 I want to write a macro which goes through all cell references in a selection's cells formula and changes them to absolute or relative . Is there a formatting variable which can change this or a function which does this already (similar to what pressing F4 does) but as a macro. 回答1: You can use ConvertFormula method. 4th Parameter determines whether its absolute or not. 1 sets it to absolute and 4 sets it to relative. As per one comment to this answer, if you are looking for mixed references,

VBA recognizing workbook by partial name

偶尔善良 提交于 2019-12-03 21:55:21
问题 Is there a way to specify a workbook for a sheet without having the full name? For example, If the workbook name is MyWorbook2015 and the 2015 may change to 2016 in the future, I need to to recognize the workbook based on MyWorkbook, and ignore the 2015. Something similar to this: With Workbooks("MyWorkbook2015").Sheets("My_Sheet_Name_That_Does_Not_Change") 'do something End With In the code sample above, I need it to recognize the work book regardless of the date? Is this possible? If it is,

Excel 2010 date formatting not working on some cells but on others

て烟熏妆下的殇ゞ 提交于 2019-12-03 21:04:49
In Excel 2010, I have a range of what looks like dates. When I attempt to format them only some changed the others remain unchanged. To be clear the right aligned 'dates' change and the left aligned 'dates' do not. (refer to 'Column M') I can format the right aligned dates into anything else such as percentage, general etc. whatever. The right aligned dates change and the left aligned remain unchanged even though they are also selected. I can edit the left aligned cells i.e. change the value I see. From looking I thought the left aligned dates were text. I read that text has an apostrophe

How to easily get network path to the file you are working on?

浪尽此生 提交于 2019-12-03 17:45:33
问题 In Excel 2003 there used to be a command that I added to my toolbar that was called Address (if I remember correctly) and it would show the fully-qualified network path to the file I had open. For example: \\ads\IT-DEPT-DFS\data\Users\someguy\somefile.xls This made it easy to grab this string and pop it in an email when you wanted to share the file with a coworker. I don't see this option in Excel 2010 but find myself needing to send/receive Excel files a lot now. Coworkers will give vague

Excel 2010: Replace a table by an external connection without impacting other sheets

。_饼干妹妹 提交于 2019-12-03 17:17:35
I have a big workbook with a lot of data. In one sheet I have a table. This table is used for many Pivot tables used in other sheets, which are also used in other sheets. The data for the table was copied manually regularly. I now have a external connection to import automatically the data but I'd like to avoid impacting other sheets. How can I use my external connection without losing my table? Thank you for your help This might be a helpful workaround. I have successfully done this but it may require a bit of rework and not be the exact answer you expect. (I am using Excel 2010). The reason