Just a follow-up if your good with JS these routines could be converted to VBA and used on the OnKeyUp event.
function dollarFormat(element){
if(event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 36 || event.keyCode == 46) return;
str = element.value;
var decimalIndex = str.indexOf('.');
if(decimalIndex != -1) {
integer = str.substring(0, decimalIndex);
decimal = str.substring(decimalIndex+1);
str = integer;
}
val = removechar(str,',');
if (val.length < 3) return true;
len = val.length;
count = parseInt(len/3);
if(len%3 == 0)
count = count - 1;
for(i = 1; i <= count; i++) {
index = len - (3*i);
val = val.substring(0,index) + ',' + val.substring(index);
}
if(decimalIndex != -1)
element.value = val +'.' +decimal;
else
element.value = val;
return true;
}
function removechar(str,ch){
str = str.toString();
while(str.indexOf(ch) != -1) {
before = str.substring(0,str.indexOf(ch));
after = str.substring(str.indexOf(ch)+1);
str = before + after;
}
return str;
}