There is a small error in this BMP code.
the line that says
lngRowSize = Round(.bmfi.intBits * .bmfi.lngWidth / 32) * 4
gotta really say
'old line: lngRowSize = Round(.bmfi.intBits * .bmfi.lngWidth / 32) * 4 lngRowSize = WorksheetFunction.Ceiling_Precise(.bmfi.intBits * .bmfi.lngWidth / 32) * 4
Previously, the round function prevented the correct export of a certain image width, and the code returned an error. Previously rejected widths: (3,6,7,11,14,15,19,22,23,27,30, ...)
I assume that you no longer need this code, but I copied it here, and I believe that someone else will be.
source share