Calling the Excel VBA SpecialCells method on a single cell will return special cells of the specified type for the entire worksheet. The function below will return a range of specified special cells for a worksheet, range or a single cell. This is the workbook I used to test with.
For testing, I needed a quick way to switch Excel Trust Center settings between restrictive and permissive. Using Process Monitor and these settings, I was able to observe the registry keys and settings Excel’s Trust Center uses to store values. Using these key/values, I created a VBScript file to automate switching between restrictive and more permissive Trust Center settings.The script […]
It’s a common problem in VBA to lose reference to module level variables. For instance, untrapped errors will set object variables to nothing. When dealing with ribbons in VBA this can be a serious problem : loss of a reference to the ribbon object means all further use of the object is impossible (Invalidate, etc.) […]