Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
But only in Switzerland!!!
I am using the following code to set the NumberFormat of some cells in a macro on my machine here in the U.S.: If sColumn(i) = "L" Or sColumn(i) = "M" Then DestCell = sColumn(i) & LTrim$(Str$(lWIPRow)) Range(DestCell).NumberFormat = myNumberFormat End If DestCell ends up being something like "L11" and myNumberFormat was picked up from a cell where there was a valid Date-style numberformat. When my colleague runs the exact same code in Switzerland, he gets a runtime error '1004': Unable to set NumberFormat property of the Range class. For him, DestCell ends up being something like "L11" and myNumberFormat was picked up from a cell where there was a valid Date-style numberformat, though in his regional style for dates. The only other thing we can think of is he has Office 2002 and I have Office 2003. He wrote the original code and sent it to me and I simply added the instructions shown above, so the rest of the code runs correctly on both machines. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
number format in regional setting vista not carried in excel2007 | Excel Discussion (Misc queries) | |||
Setting Error #VALUE,#REF,#NAME, etc. | New Users to Excel | |||
Setting Cell Number Format With A Worksheet Function | Excel Worksheet Functions | |||
Number format based on number format of another cell in another workbook | Excel Programming | |||
Setting number format on range of cells | Excel Programming |