Results 1 to 2 of 2

Thread: refresh sheet?

  1. #1
    Join Date
    Oct 2003
    Posts
    311

    Unanswered: refresh sheet?

    i am usign the following code to change the background color of a cell :

    xl.Range(rng).Select()
    With xl.Selection.interior()
    MsgBox(.ColorIndex)
    If .ColorIndex = -4142 Then
    .ColorIndex = 6
    .Pattern = Excel.XlPattern.xlPatternSolid
    Else
    .ColorIndex = -4142
    .Pattern = Excel.XlPattern.xlPatternSolid
    End If
    end with

    this should change the color but it isnt do i need to refresh the sheet? or something. the reason the code looks a lil diff is because its in .net but it should work .

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    It looks like your code is just reversing your first change back to its original.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

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