View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] dave.cuthill@computalog.com is offline
external usenet poster
 
Posts: 53
Default Greg Wilson - XY coordinates of a worksheet

Thanks this is very helpful - glad you were able to dig it up from
your archive.

On Aug 8, 11:28 pm, Greg Wilson
wrote:
Sorry, the CorrectZoomFactor function was half-baked and you need to make
another minor change. In the MoveShapeToMouse macro, change:

z = CorrectZoomFactor(.Zoom)

to:

z = CorrectZoomFactor(.Zoom / 100)

Also, substitute the following for the CorrectZoomFactor function:

Function CorrectZoomFactor(ByVal z As Single) As Single
Select Case z
Case 2
z = 2
Case 1.75
z = 1.765
Case 1.5
z = 1.529
Case 1.25
z = 1.235
Case 1
z = 1
Case 0.9
z = 0.882
Case 0.85
z = 0.825
Case 0.8
z = 0.82
Case 0.75
z = 0.74
Case 0.7
z = 0.705
Case 0.65
z = 0.645
Case 0.6
z = 0.588
Case 0.55
z = 0.53
Case 0.5
z = 0.5296
Case Else
z = 1.0069 * z + 0.0055
End Select
CorrectZoomFactor = z
End Function

Greg