Cell Format to Dialog Box in Chart

B

Bill

Hello All,
I would like to find out what the format is for a cell (e.g., A1) and then
use that format to set the format of numbers I have on a chart in a dialog
box. I have used the following to find the format:

cf = Cells(1, 1).NumberFormat
dd = 1
Sheets("Chart1").Select
ActiveChart.Shapes("Text Box 1").Select
dd = Format(dd, cf)
Selection.Characters.Text = dd

If I use this in Excel 2000 and the format is "General", the value of dd
becomes "Gen0eral" in the text box. It works fine in Excel 2003. Any
suggestions on how to get around this in Excel 2000?

Thanks.

Bill
 

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

Top