Number Format

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

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.
 
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
 
What would you use to find the number format in Excel 2002 then?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top