Results 1 to 5 of 5

Thread: Format borders in Excel sheet

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Location
    N
    Posts
    10

    Format borders in Excel sheet

    I am trying to get VB to format borders in an Excel sheet.
    Why isn't the following code working?

    Dim xlEdgeBottom
    Dim xlDouble
    Dim xlThick

    xlEdgeBottom = 1
    xlDouble = 1
    xlThick = 1

    Set Range1 = Sheet5.Range("A1", "C1")

    With Range1.Borders(xlEdgeBottom)
    .Linestyle = xlDouble
    .Weight = xlThick
    End With


    Does anyone have any tips on links or other codes (border style, etc)

    THX

    Humty

  2. #2
    Si_the_geek
    Guest
    Problem 1 - you shouldnt be defining the constants, and you've got them wrong anyway; they should be:

    xlEdgeBottom = 9
    xlDouble = -4119
    xlThick = 4


    Problem 2 - what is this in? VB, Excel VBA?


    Problem 3 - does the sheet exist?

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2002
    Location
    N
    Posts
    10
    Problem 1 - you shouldnt be defining the constants, and you've got them wrong anyway; they should be:

    xlEdgeBottom = 9
    xlDouble = -4119
    xlThick = 4




    Problem 2 - what is this in? VB, Excel VBA?

    > VB


    Problem 3 - does the sheet exist?
    [/QUOTE]

    >Yes

    Hope u can help me.
    -e-

  4. #4
    Si_the_geek
    Guest
    ok, I need to see more of your code that comes before this bit (especially the bit ti to get the sheet reference).

  5. #5
    New Member
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    11
    I too need various xl constants defined. (ie. xlNone, xlEdgeBottom, xlThin, xlAutomatic, xlCenter, etc.)

    What do I need to do to get these added to my dll?

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