I hope this is an easy one:
I copied the following lines of code from one macro in a work book and pasted it into another workbook:
These lines find a particular number format
Application.FindFormat.Clear
Application.FindFormat.NumberFormat = _
"_(* #,##0_);_(* (#,##0);_(* ""-""_);_(@_)"
'The following lines replace that number format with numbers rounded to "Thousands"
Application.ReplaceFormat.Clear
Application.ReplaceFormat.NumberFormat = "#,##0,_);(#,##0,);-"
When I run the macro in the new sheet I get an error message that says "Application defined or object defined error". Keep in mind that the exact same code works fine in another workbook. There are other lines of code that perfrom other tasks, but I've isolated those and this is the only one that gives me trouble. Let me know if you need any further explanation.
RF
I copied the following lines of code from one macro in a work book and pasted it into another workbook:
These lines find a particular number format
Application.FindFormat.Clear
Application.FindFormat.NumberFormat = _
"_(* #,##0_);_(* (#,##0);_(* ""-""_);_(@_)"
'The following lines replace that number format with numbers rounded to "Thousands"
Application.ReplaceFormat.Clear
Application.ReplaceFormat.NumberFormat = "#,##0,_);(#,##0,);-"
When I run the macro in the new sheet I get an error message that says "Application defined or object defined error". Keep in mind that the exact same code works fine in another workbook. There are other lines of code that perfrom other tasks, but I've isolated those and this is the only one that gives me trouble. Let me know if you need any further explanation.
RF