+ Reply to Thread
Results 1 to 5 of 5

How to fix ### field value programmatically.

  1. #1
    Alex B.
    Guest

    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. #2
    Tom Ogilvy
    Guest

    RE: 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. #3
    Jim Thomlinson
    Guest

    RE: 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. #4
    Alex B.
    Guest

    RE: 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. #5
    Alex B.
    Guest

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