Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had code running in Excel 97 that would throw an error, but now that I am running Excel 2003 it does not.
Format$("0.5","General" It used to throw error 5 (Invalid procedure call or argument), but now it returns "Ge5eral". Is this a documented change? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're mixing Worksheet NumberFormat expression with VBA format.
It's interpretting the N in "General" as a minute (hh:nn:ss) If you want to format a cell as General: ActiveCell.NumberFormat = "General" -- Rob van Gelder - http://www.vangelder.co.nz/excel "PF" wrote in message ... I had code running in Excel 97 that would throw an error, but now that I am running Excel 2003 it does not. Format$("0.5","General") It used to throw error 5 (Invalid procedure call or argument), but now it returns "Ge5eral". Is this a documented change? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try:
Format$(0.5, "General Number") (not sure why you had "0.5" in double quotes, either.) PF wrote: I had code running in Excel 97 that would throw an error, but now that I am running Excel 2003 it does not. Format$("0.5","General") It used to throw error 5 (Invalid procedure call or argument), but now it returns "Ge5eral". Is this a documented change? -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Thanks for posting in the community! I agree with Rob and Dave. If you have any other questoins, please feel free to let me know. Enjoy a nice weekend! Wei-Dong Xu Microsoft Product Support Services Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's all interesting information, but it didn't really
answer my question, which is why does this statement not throw an error while it did in previous versions. -----Original Message----- Hi, Thanks for posting in the community! I agree with Rob and Dave. If you have any other questoins, please feel free to let me know. Enjoy a nice weekend! Wei-Dong Xu Microsoft Product Support Services Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. . |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi PF,
Thank you for replying! Currentlly we are performing some research on this problem, and we will reply you ASAP if we get any results! Wei-Dong Xu Microsoft Product Support Services Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, It sure looks like the string "General" is being interpreted as a format string and that your value is being inserted at the "n" position. I will have to investigate if the behavior Format in Excel 2003 has changed. I'll post another reply as soon as I have finished investigating. Thanks for your patience. Thanks, Jim Jim Vita Microsoft Developer Support This posting is provided "AS IS" with no warranties, and confers no rights. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can no longer format values in pivot table | Excel Discussion (Misc queries) | |||
excel can no longer recognise format | Excel Discussion (Misc queries) | |||
Accounting format now no longer display negative figures in ( )'s | Excel Discussion (Misc queries) | |||
After grouping & ungrouping a chart, I can no longer format it? | Charts and Charting in Excel | |||
[Q] Save As throws type mismatch error in control's code? | Excel Discussion (Misc queries) |