Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.office.misc,microsoft.public.excel.programming
|
|||
|
|||
VB Macro in Excel 2007
asimmons wrote...
I frequently need to format excel reports that show no values after a decimal point if it is a two digit number and one value after the decimal point if it is a single digit number. *For example... 3.12, 20.78, -1.22 and -10.55 would be displayed 3.1, 21, (1), and (11). *I have created a macro that does this for numbers I type in however when I try to expand it to select cells in my reports, I get an error code that says 400. *I'm not sure if I have the parameters set wrong or if it is because the report cells are referencing formulas. *I have attached my code. *Anybody have suggestions???? .... How big is your selection? If it's very big, it's possible you're blowing through Excel's object model's limits on the number of areas in a multiple area range. You may have to iterate through your selection in smaller size chunks. BTW, it'd be better to post this sort of question to the microsoft.public.excel.programming newsgroup rather than this one. I'm crossposting to microsoft.public.excel.programming and setting the follow-up tag to that newsgroup. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Macro in Excel 2007
On May 11, 8:03*pm, Harlan Grove wrote:
asimmons wrote... I frequently need to format excel reports that show no values after a decimal point if it is a two digit number and one value after the decimal point if it is a single digit number. *For example... 3.12, 20.78, -1.22 and -10.55 would be displayed 3.1, 21, (1), and (11). *I have created a macro that does this for numbers I type in however when I try to expand it to select cells in my reports, I get an error code that says 400. *I'm not sure if I have the parameters set wrong or if it is because the report cells are referencing formulas. *I have attached my code. *Anybody have suggestions???? ... How big is your selection? If it's very big, it's possible you're blowing through Excel's object model's limits on the number of areas in a multiple area range. You may have to iterate through your selection in smaller size chunks. BTW, it'd be better to post this sort of question to the microsoft.public.excel.programming newsgroup rather than this one. I'm crossposting to microsoft.public.excel.programming and setting the follow-up tag to that newsgroup. Harlan, The cross post to microsoft.public.excel.programming did not bring over your code. Please post the code to the aforementioned group. Best, Matthew Herbert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Macro | Excel Discussion (Misc queries) | |||
macro in excel 2007 | New Users to Excel | |||
Excel 2007 Macro Help (Excel 2003 not working in 2007) | Excel Discussion (Misc queries) | |||
In Excel 2007 how to switch off macro with a macro | Excel Programming | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions |