I have a sub in a module for flipping pictures.
It normally works fine.
But I've added it to a project where it isn't working.

I tried copying the problem picturebox to a new project and it will work then.

The problem project is way too big to post here.

Any ideas on what could prevent the following sub from working?
VB Code:
  1. Public Sub FlipImage(PicFrom As Object, picTo As Object)
  2. 'to place the new image over the old one just use the same obj for both paramiters
  3.     Dim bAuto As Boolean
  4.     Dim lScaleT As Long
  5.     Dim lScaleF As Long
  6.    
  7.     On Error GoTo BadObject:
  8.     lScaleT = picTo.ScaleMode
  9.     picTo.ScaleMode = vbTwips
  10.     lScaleF = PicFrom.ScaleMode
  11.     PicFrom.ScaleMode = vbTwips
  12.     bAuto = picTo.AutoRedraw
  13.     picTo.AutoRedraw = True
  14.     picTo.PaintPicture PicFrom.Picture, 0, PicFrom.Height, _
  15.                        PicFrom.Width, -PicFrom.Height
  16.     picTo.Picture = picTo.Image
  17.     picTo.AutoRedraw = bAuto
  18.     picTo.ScaleMode = lScaleT
  19.     PicFrom.ScaleMode = lScaleF
  20.    
  21. BadObject:
  22. End Sub