+ Reply to Thread
Results 1 to 2 of 2

Cell Format to Dialog Box in Chart

  1. #1
    Bill
    Guest

    Cell Format to Dialog Box in Chart

    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



  2. #2
    Tom Ogilvy
    Guest

    RE: Cell Format to Dialog Box in Chart

    test if the value of cf is General? Then adjust accordingly.

    --
    Regards,
    Tom Ogilvy


    "Bill" wrote:

    > 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
    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1