Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Number Format

Hello,
I have the following that works in Excel 2003, but not in Excel 2000. I
am trying to apply a number format to an average of a range (called DB)

Dim VF as string, DB as database, DAvg
VF = DB(1,1).numberformat
DBavg = format(application.average(DB),VF)

When the number format is General, the value I get for DBAvg is
"Ge5enral". Why is that happening and how do I get around this?

Thanks.





*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Number Format

On Thu, 16 Mar 2006 03:39:58 -0800, Bill wrote:

Hello,
I have the following that works in Excel 2003, but not in Excel 2000. I
am trying to apply a number format to an average of a range (called DB)

Dim VF as string, DB as database, DAvg
VF = DB(1,1).numberformat
DBavg = format(application.average(DB),VF)

When the number format is General, the value I get for DBAvg is
"Ge5enral". Why is that happening and how do I get around this?

Thanks.


I don't know about Excel 2003, as I only have 2002, but in 2002, numberformat
is not a property of the Database object.


--ron
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Number Format

What would you use to find the number format in Excel 2002 then?



*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Number Format

On Thu, 16 Mar 2006 11:56:17 -0800, Bill wrote:

What would you use to find the number format in Excel 2002 then?



*** Sent via Developersdex http://www.developersdex.com ***


When I've used the NumberFormat property in Excel 2002, I've used it as a
property of the Range object.

I really don't have any experience with the Database collection or object. But
in VBA6, there is no NumberFormat property for that object.


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace million-billion number format to lakhs-crores format Sumit Excel Discussion (Misc queries) 1 December 9th 05 04:58 PM
convert text-format number to number in excel 2000%3f Larry Excel Discussion (Misc queries) 1 July 29th 05 08:18 PM
Number format based on number format of another cell in another workbook Rob Excel Programming 9 January 9th 05 04:30 PM
How do i change numbers in text format to number format? Greg New Users to Excel 1 December 14th 04 05:22 PM
excel format cells/Number/Category: Number problem Matts Excel Discussion (Misc queries) 5 December 9th 04 09:47 PM


All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"