Bounding Box Macro - Get units in Fractions

I was using this macro for creating the bounding box and stock size properties

Here is the original macro

I got the above macro from this forum and tried to modify with my limited knowledge of VBA and couldn't make it work with fractional units

Even if I change my part unit to fractions, it returns the value in decimals

Can someone please help me to modify this code to display and return the value in Inches-Fractions if the document unit is in fractions

Thanks!

SolidworksApi macros