Repainting a Workbook

C

cincode5

I have a workbook that contains about a dozen or so Rectangles that are color
formatted with fill effects. I've noticed that whenever I use a pull down
menu, a portions of the Rectangles change color. Its a subtle change of
perhaps a shade or two but its quite annoying. If I switch to another
worksheet then return the image returns back to its normal appearance.

I noticed a VBA command "Repaint", but cannot seem to figure out the correct
syntex. "HELP" say its object.Repaint, but I can't seem to get it to work
when I apply it to a Rectangle. Can someone please tell what I'm doing
wrong, or suggest an alternate method.

Thanks guys...
 
D

Dave Peterson

Maybe you could have a macro that switches to a different worksheet that
switches back.

I've never seen anything like this, but you may want to try it by adding a new
sheet:


Option Explicit
Sub testme01()

Dim CurSelection As Range
Dim ActCell As Range
Dim DummyWks As Worksheet

Set ActCell = ActiveCell
Set CurSelection = Selection

With Application
.ScreenUpdating = False
Set DummyWks = Worksheets.Add
.DisplayAlerts = False
DummyWks.Delete
.DisplayAlerts = True
.Goto CurSelection
ActCell.Activate
End With

End Sub

If that doesn't work, try deleting the .screenupdating lines.
 
C

cincode5

Thanks Dave... I'll give this a try.

I also just read about Frank. Tragic loss to this community. I was
saddened to read this because he's replied to a couple of my posts.

Thanks again Dave.
 
Top