Results 1 to 2 of 2

Thread: [RESOLVED] [VB6] Coloring Excel Cell from VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2012
    Posts
    7

    Resolved [RESOLVED] [VB6] Coloring Excel Cell from VB6

    Hi Guys,

    Do you have any idea how to set excel cell from VB6 Codes?

    Set ExlObj = CreateObject("excel.application")
    ExlObj.ActiveSheet.Cells(1, 1).Columns.ColumnWidth = 18
    ExlObj.ActiveSheet.Cells(l, m).Rows.BackColor = vbGreen << IS NOT WORKING

    Thanks,
    Jefri

  2. #2

    Thread Starter
    New Member
    Join Date
    Jun 2012
    Posts
    7

    Resolved Re: [VB6] Coloring Excel Cell from VB6

    Got it already

    You can use ColorIndex (to use one of the 56 "preset" colors in Excel):

    ActiveCell.Interior.ColorIndex = 36

    Or you can use Color:

    Range("A1:G6").Interior.Color = RGB(200,160,35)

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