Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to fix ### field value programmatically.

I need to fix a problem with a column that displays ### instead of the
correct value programmatically. If I open the spreadsheet manually I can
widen the column and the values appear and it's done.

When I read the values programmatically I get ###s. I've tried to resolve
this by widening the column using Range.ColumnWidth as well as calling
RAnge.AutoFit() to no avail.

Any ideas anyone?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to fix ### field value programmatically.

use the value property instead of the Text property and you shouldn't get the
###

activecell.EntireColumn.Autofit

should fit the column unless you have merged cells.

--
Regards,
Tom Ogilvy


"Alex B." wrote:

I need to fix a problem with a column that displays ### instead of the
correct value programmatically. If I open the spreadsheet manually I can
widen the column and the values appear and it's done.

When I read the values programmatically I get ###s. I've tried to resolve
this by widening the column using Range.ColumnWidth as well as calling
RAnge.AutoFit() to no avail.

Any ideas anyone?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default How to fix ### field value programmatically.

When you grab the value of the cell programatically use value instead of
text. this will grab the value of the cell, instead of the text displayed.

msgbox range("A1").Text 'shows #####
msgbox range("A1").value 'shows 12345

--
HTH...

Jim Thomlinson


"Alex B." wrote:

I need to fix a problem with a column that displays ### instead of the
correct value programmatically. If I open the spreadsheet manually I can
widen the column and the values appear and it's done.

When I read the values programmatically I get ###s. I've tried to resolve
this by widening the column using Range.ColumnWidth as well as calling
RAnge.AutoFit() to no avail.

Any ideas anyone?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to fix ### field value programmatically.

With this spreadsheet

range("A1").Text
range("A1").Value
range("A1").Value2

all show "#########". Also

range("A1").columnWidth = 500
range("A1").autofit()

do not resolve the problem.

if I open the same spreadsheet with Excel the column originally appears with
###s but if I expand the column the correct values appear.

Anyone else have any ideas???


"Jim Thomlinson" wrote:

When you grab the value of the cell programatically use value instead of
text. this will grab the value of the cell, instead of the text displayed.

msgbox range("A1").Text 'shows #####
msgbox range("A1").value 'shows 12345

--
HTH...

Jim Thomlinson


"Alex B." wrote:

I need to fix a problem with a column that displays ### instead of the
correct value programmatically. If I open the spreadsheet manually I can
widen the column and the values appear and it's done.

When I read the values programmatically I get ###s. I've tried to resolve
this by widening the column using Range.ColumnWidth as well as calling
RAnge.AutoFit() to no avail.

Any ideas anyone?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to fix ### field value programmatically.



"Jim Thomlinson" wrote:

When you grab the value of the cell programatically use value instead of
text. this will grab the value of the cell, instead of the text displayed.

msgbox range("A1").Text 'shows #####
msgbox range("A1").value 'shows 12345

--
HTH...

Jim Thomlinson


"Alex B." wrote:

I need to fix a problem with a column that displays ### instead of the
correct value programmatically. If I open the spreadsheet manually I can
widen the column and the values appear and it's done.

When I read the values programmatically I get ###s. I've tried to resolve
this by widening the column using Range.ColumnWidth as well as calling
RAnge.AutoFit() to no avail.

Any ideas anyone?

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
How do I remove a Calculated Field from the Pivot Table field list TheTraveler Excel Discussion (Misc queries) 2 April 9th 10 06:55 PM
How to make a field created a part of the Pivot Table Field List? drhell Excel Discussion (Misc queries) 0 January 29th 07 11:13 PM
Linked date field in worksheet defaults a blank field as 1/0/1900 AmnNkD Excel Worksheet Functions 2 September 12th 06 05:42 PM
Bolding middle of a field programmatically Robs Excel Programming 5 January 27th 06 09:37 PM
Programmatically reading data field values from PivotTable Enrico Campidoglio[_2_] Excel Programming 2 July 13th 05 12:32 PM


All times are GMT +1. The time now is 12:28 PM.

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"