AOB
Well-known Member
- Joined
- Dec 15, 2010
- Messages
- 669
- Office Version
- 365
- 2016
- 2013
- Platform
- Windows
I have created a workbook that pulls information from Active Directory and presents it on a tab (arbitrary number of rows depending on the criteria etc.) Built it years ago, been tweaking it here and there over time but by and large still the same.
Recently, after one such tweak (which should have no bearing on this particular problem), I've noticed a very strange issue with the formatting on the resultant sheet.
For some reason, once the macro has completed, the cell contents have been shifted down for some reason, such that only the top of the text is visible, and the rest is obscured behind the cell below. The cell contents also appear to get "stretched" horizontally. But not consistently - the problem seems to exacerbate as you move left-to-right or top-to-bottom across the sheet.
I can resize the rows to see the missing text, but the weird top-margin-like behaviour still persists (an autofit reduces the rows to the correct, minimal size but the obscuring of the cell contents persists)
Weirder still - this behaviour seems to differ depending on where I open the workbook from? So if I save the exact same workbook to a number of different locations, the formatting problem doesn't present itself consistently when I open and run the code from each of those locations (e.g. if I run it from my local C: drive, there's no issue; if I run it from one network share, the issue presents itself; if I run it from a different network share, again, no issue)
Also - I have about 18-20 conditional formatting rules (applied dynamically via the code) - nothing particularly resource-intensive and the same rules have been in place since the beginning - but sometimes (and, again, there's no obvious consistency to this), the cells to which one rule applies, appear fine, but other cells to which other rules apply, suffer from this weird "shunting" problem. The priority of the rules doesn't seem to have any impact. If I delete a rule for a set of cells suffering from the "shunting", the now-unformatted cells return to normal. If I then re-introduce the rule, it formats everything perfectly (but only for those cells impacted by the rule - other cells covered by different rules, still have the "shunting") So in order to fix it, I would have to manually go through each of the rules, delete them and restore them again, to get rid of the formatting problem. Not ideal (the whole point of this is to automate the whole thing start-to-finish)
It's so bizarre and I can't figure out why this might be happening or, more importantly, how I can prevent it happening.
Has anybody else come across this and found a solution?
Recently, after one such tweak (which should have no bearing on this particular problem), I've noticed a very strange issue with the formatting on the resultant sheet.
For some reason, once the macro has completed, the cell contents have been shifted down for some reason, such that only the top of the text is visible, and the rest is obscured behind the cell below. The cell contents also appear to get "stretched" horizontally. But not consistently - the problem seems to exacerbate as you move left-to-right or top-to-bottom across the sheet.
I can resize the rows to see the missing text, but the weird top-margin-like behaviour still persists (an autofit reduces the rows to the correct, minimal size but the obscuring of the cell contents persists)
Weirder still - this behaviour seems to differ depending on where I open the workbook from? So if I save the exact same workbook to a number of different locations, the formatting problem doesn't present itself consistently when I open and run the code from each of those locations (e.g. if I run it from my local C: drive, there's no issue; if I run it from one network share, the issue presents itself; if I run it from a different network share, again, no issue)
Also - I have about 18-20 conditional formatting rules (applied dynamically via the code) - nothing particularly resource-intensive and the same rules have been in place since the beginning - but sometimes (and, again, there's no obvious consistency to this), the cells to which one rule applies, appear fine, but other cells to which other rules apply, suffer from this weird "shunting" problem. The priority of the rules doesn't seem to have any impact. If I delete a rule for a set of cells suffering from the "shunting", the now-unformatted cells return to normal. If I then re-introduce the rule, it formats everything perfectly (but only for those cells impacted by the rule - other cells covered by different rules, still have the "shunting") So in order to fix it, I would have to manually go through each of the rules, delete them and restore them again, to get rid of the formatting problem. Not ideal (the whole point of this is to automate the whole thing start-to-finish)
It's so bizarre and I can't figure out why this might be happening or, more importantly, how I can prevent it happening.
Has anybody else come across this and found a solution?