I’m preparing an Excel file to collect data from external users.
Users will have other Excel files open and they will also have the clipboard open in those files. This will, by default it seems, result in the clipboard being open in my file.
Is there a way to automatically close the clipboard, if it is open, with VBA code when users open the file? (I only want to close it. It doesn’t have to be emptied before doing so.)
My concern is that the clipboard takes up too much space in the left margin. I want the screen to have maximum width when the file is opened.
The code should work for Excel 2013 and later versions.
It sounds like you just want this:
application.CommandBars("Office Clipboard").Visible = False
Related
I make a lot of workbooks where there is no data in the workbooks themselves, but there are macros and forms attached. I generally format these in .xlsb or occasionally .xlsm file format, but I'm wondering if there is a format where there is no actual workbook attached. Just like a file you can open in Excel that will launch the macro?
It just seems pretty inefficient to include a blank workbook that I just autohide on load.
Depending on the version of Excel, when you load up Excel it automatically opens a Personal workbook which isn't visible.
Normally this is created when you record a macro and close all windows. It will then ask you to save it to the file. I would then set up shortcuts for the Macros.
I have a problem with Excel that occurs multiple times a day and is totally random. Whenever I have multiple excel workbooks opened and I try to close one by right clicking the icon on the taskbar and clicking "close window", instead of closing the file it will open a random saved excel workbook. The workbook then gets automatically pinned. It doesn't get pinned to my taskbar but when I right click an excel file it gets pinned above RECENT.
Has anyone have this issue before? I can't seem to find a solution and it is bugging me a lot since it happens frequently.
I am using excel 2010.
Edit - The file that opens is always the same file. Even if I unpin it and go about my day eventually it will happen again and it is the same file.
I am trying to develop a manner in VBA to track changes in a document without having to hide the contents in an extra sheet within a workbook.
I understand that if you change the extension of an Excel file to ".zip", you can access the Excel document as components sorted into directories. Is there a way to save and write to a text file within one of these directories so that I can access it every time the document is opened, without having to have the user drag a log file along with the Excel document?
Some facts:
When Excel opens the file, the file is blocked by Excel. There is no possibility to write to that file within VBA
You can store additional data into that file externally or after the Excel workbook has been closed
You would need to have code externally from the workbook to accomplish writing to that file after it has been closed. You may want to use VSTO or an oldschool Excel Addin.
you have to ensure that Excel will not destroy your changes when restructuring or repairing the file.
In the first run, your idea sounds very natural, to not use sheets from a programmer's point of view. You only have full control on Excel files when
you use external libraries (e.g. Spreadsheet Gear) or
you remote control Excel via automation.
you use openxml SDK for Excel
you use VBA
You could insert additonal information and take care that this information is not skipped by Excel.
When you want to do the tracking this way, I would suggest you to use an Excel Addin. There is actually no need for installation when using this kind of Addin. Attach to open workbook and close workbook events and ensure that all changes are written to the Excel Workbook after it has been closed. Certainly you would have to attach to all kind of other events to track all changes to the workbook. You may need to have in mind that there can be more than one workbook opened at a time.
Actually there are alternatives.
write your logging code in VBA or whatever fits
abstract away how your persist the code (e.g. use a data provider)
think about these two alternatives to store logging data:
You can save logging data in cells of excel. When using a "newer" version of excel, you have a limit of 1 million rows. You may want to implement a rolling mechanism that ensures that you never go over the border of 1 million records. (you may be dont want to track a million changes)
You can use the document properties to store you information as xml.
Last but not least, the most obvious: Why not using Excel's functionality of tracking changes? Understand track changes in Excel 2013
I have Matlab code using xlswrite to save data to an excel sheet.
Can I open Excel such that Matlab will still be able to write? Also, can I refresh silently?
(In Notepad++ this would be realized via Preferences > MISC > Update Silently, very useful for logfiles)
Thanks!
I am not aware of any way to achieve your 'Refresh Silently' functionality.
Of course, you can open an Excel file read-only easily using VBA or via the File Open dialog.
I'm having the following issue: I've an Excel spreadsheet with a lot of VBA codes and ActiveX controls, including RExcel formulas.
The Excel version is 2007.
When I try to open this file, Task Manager says Excel isn't answering and something starts like if Excel started running endless codes; I deactivated each control and it still seems broken.
I would like to recover at least some formulas I've written in that spreadsheet, but this is actually impossible by opening the spreadsheet in conventional way.
Could you tell me how I can "read" formulas and text in that spreadsheet without opening it by Excel?
Thanks,
Indeed have calculation set to manual for a start.
Now set your security settings such that macros and activeX are disabled:
Excel Options > Trust Center > Trust Center Settings... > Macro Settings > Disable all macros with notification
For ActiveX I am not sure if there is a menu in excel-2007 like for macros, but if there is make sure it is set to not run as well.
Now you can open your excel workbook and it will not run your macro's and shouldn't auto calculate or update!
ADDED: I have had something like this in the past and this is what worked in 1 occasion: install an other office excel application, like open office (the calc application has the excel functionality) and see if it opens in that application. Then if it does, save the file (under another file name) and close it. Open the new file under MS Office Excel, and see what is still recoverable.
Good luck!
use a tool like 7zip to extract the files. the sheets/formulas are in the .xml
the code in a macro enabled spreadsheet is in a .bin file
this can be read with MalOfficeScanner