We have developed a complex excel workbook that has numerous tabs and lots of excel macros tied to various cells within the workbook. We plan on distributing the workbook to users via clickonce from a common network share so we can push updates to the spreadsheets as necessary.
Once thing we have noticed is that it appears when we try to update the macros in the workbook that these are not updated via clickonce -- only the changes in individual tabs are made. But the excel macros don't seem to get updated.
Is this expected behavior? Are we doing something wrong with clickonce? It seems like a critical flaw in the clickonce design if macros can't get updated.
Not sure how to proceed -- suggestions eagerly sought!
Thanks,
Mark
Related
I have a workbook in which I consolidate data from various CSV files. There are a number of macros in this file including ones to add new sheets to the file, which is on a shortcut key Ctrl+Shift+N. This has been working perfectly for many years. This morning the shortcut key does absolutely nothing. If I go to the Excel developer tab and click on the Macros button, the list of macros is empty. However, if I open VBA I can run the macro from there and it still works perfectly.
I run Office Professional Plus 2019 and it ran an update yesterday. Does anyone know of a new setting introduced that may hide the macros in Excel itself. Note that macros are enabled on this workbook.
Just for closure should someone else stumble across this. The problem was related to the specific file. It somehow got "partially" corrupted. Still worked and could fire macros from VBA IDE as well as linked buttons, just not with shortcut keys as macros not "visible" in Excel view. File degraded further to a point where it could no longer save.
I am wondering if it is possible to let an HTML/JS add-in open and close a set of workbooks one by one.
I have not seen the JavaScript API to open or close a workbook, and don't know if it is doable in a JavaScript function.
Otherwise, because VBA can repeat opening and closing workbooks, is it possible to set a mechanism in VBA to run systematically a function of an HTML/JS add-in every time a workbook is open?
There is no built-in functionality for this in the JS APIs. We are aware of the gap, and it is on the long-term roadmap, but not something on the immediate horizon.
Depending on whether the workbook being opened already has your Office Add-in inserted or not, though, you can probably do a VBA workaround. Namely, you could have the Office Add-in create a binding (if it's not already there) on some well-known cell in a hidden sheet, and attach an event listener to it. VBA would then go and write in to the same cell, triggering the event. Again, this only works if the add-in is already inserted and essentially in a template-like scenario; but if it fits your requirements, then that would work.
Best!
~ Michael Zlatkovsky, developer on Office Extensibility team, MSFT
TL;DR: Why/How does a workbook suddenly have Trace Auditing disabled (not protected)? What causes Excel to activate this behavior?
I was working on an Excel spreadsheet that I had created a while back and wanted to use the Formula Auditing "Trace Precedent" functionality. To my surprise it was grayed out. Everything else worked fine except that feature. Neither the workbook nor the worksheet were protected.
Searching the web I was able to quickly find a solution:
File Menu>Options>Advanced>Display Options for this workbook>For Objects shown: select **"all"**
I want to know how to prevent this from popping up as an issue for employees who use my templates. Or what triggers it. I certainly didn't set this option in Excel on purpose.
I've discovered another reason why some of the formula auditing functions get disabled, even in worksheets where objects are being shown properly.
If I Ctrl+LeftClick more than one worksheet name tab at the bottom (which I do to include more than one sheet when I print), five of the six functions become greyed out, leaving only Show Formulas available. This peculiar behavior is present in Office 2010 for Windows and in Microsoft 365 (a.k.a. Office 365) for Windows.
I have a very complex Excel workbook, with an awful lot of VBA code and macros in it. For version control purposes, I'd really like to be able to save the code as separate files to the workbook proper - to split it off into modules. Is this a thing that's remotely possible?
You should also look into Add-ins (.xlam). These allow your modules/class modules to be referenced in other workbooks. If you deploy a tool to a workgroup then realize that you need to change a macro you can update the .xlam and it gets pushed to all workbooks that reference it.
I'm working on some VBA heavy sheets in Excel 2007. At my previous work we had a lot of sheets which were calc-ing for a long period ( valuing trades etc ) and if you opened another 2003 session completely they didn't interfere with each other.
It seems in 2007 if one Excel session is running and is working hard on VBA then other Excel sessions also hang. It's most annoying as I can't even code in the VBE while the other runs.
Has anyone else noticed this? I am on an 8 CPU workstation and it is nowhere near flat out. The only thing I can think of is that they do both load the same .xla's on start up but I would have thought each xla would be inside the seperate Excel sessions?
No matter how many Excel workbooks (of one version) you open, they all still operate off of the same process. If one workbook demands all of the resources of that process, then all of the workbooks will suffer the same lag.
Different versions of Excel, however, will not interfere with each other. If you're running both versions, you could relegate one version to a specific task and then use the other. It is also possible in 2003 (and perhaps 2007) to spawn different instances of the actual application by starting Excel from the Start menu while Excel is already open, but that's known to cause errors, especially if you utilize a personal workbook to store macros or other data. If both 2003 and 2007 are trying to open the same personal workbook, you'll wind up with the same issue.