Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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
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
Cell format dialog box will not open ms.giz Excel Discussion (Misc queries) 1 May 21st 08 05:34 PM
select adjustment tab in cell format dialog x taol Excel Programming 2 January 22nd 06 04:31 AM
format cell tabs hidden in excel dialog box briangw Excel Discussion (Misc queries) 0 June 3rd 05 03:05 PM
3 format cell tabs hidden in excel dialog box pjbjamison Excel Discussion (Misc queries) 1 May 4th 05 04:50 PM
When I select "format cells", the format dialog box does not disp. Andy S. Excel Worksheet Functions 2 November 23rd 04 03:49 AM


All times are GMT +1. The time now is 11:52 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"