Results 1 to 3 of 3

Thread: Excel - Object Model [RESOLVED]

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Question Excel - Object Model [RESOLVED]

    I am automating Excel (2000) from within a VB app and I am trying to set the width of the first column like this:

    VB Code:
    1. newsheet.Columns(1).width = 60

    Unfortunately, I just get the following error:
    Unable to set the Width property of the Range class
    Anybody know how to do this?
    Last edited by simonm; Oct 21st, 2002 at 10:05 AM.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901
    VB Code:
    1. Columns("G:G").ColumnWidth = 14.13


    Doesnt look too far off?

    Seahag

  3. #3

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796
    Cheers...that seems to work!
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

Posting Permissions

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



Click Here to Expand Forum to Full Width