I have a protected sheet with many columns. Certain numeric cells in various columns are unlocked for data entry. The font size I am using is Arial 10. The column widths are fixed at 12 (89 pixels) because I don't want the user changing them as this can throw off the pre-set print and zoom settings. I do not want to make the columns any wider because I have a lot of columns in this worksheet and making them wider will just require the user to horizontally scroll more.
While this pre-set font size and column width setting allows the user to enter a fairly large number, if the number entered is too large then the cell display will be "XXXXXXXX". While Excel will still recognizes the overfilled cell value as a number, it looks ugly on the monitor and on printed reports.
I recognize that I can format the cells with the "Shrink To Fit" option, but I don't like this option since it only shrinks the applicable (overfilled) cells and leaves all the others as is. The result is different size fonts, which looks awkward.
My question is:
Is it possible through VBA to detect when a numeric cell is overfilled and displays "XXXXXXXX"?
If so, I can prompt the user to reduce the font size, reduce the number of digits after the decimal place (currently 4), and/or change to a narrower font. I could make these changes "global" across the entire data entry area so all fonts are displayed in the same size. The user cannot change the font face or size currently because the worksheet is protected.
Any ideas?
While this pre-set font size and column width setting allows the user to enter a fairly large number, if the number entered is too large then the cell display will be "XXXXXXXX". While Excel will still recognizes the overfilled cell value as a number, it looks ugly on the monitor and on printed reports.
I recognize that I can format the cells with the "Shrink To Fit" option, but I don't like this option since it only shrinks the applicable (overfilled) cells and leaves all the others as is. The result is different size fonts, which looks awkward.
My question is:
Is it possible through VBA to detect when a numeric cell is overfilled and displays "XXXXXXXX"?
If so, I can prompt the user to reduce the font size, reduce the number of digits after the decimal place (currently 4), and/or change to a narrower font. I could make these changes "global" across the entire data entry area so all fonts are displayed in the same size. The user cannot change the font face or size currently because the worksheet is protected.
Any ideas?