Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Norman Jones

Norman, in regards to your help yesterday on resizing pictures I have a
problem today as I have added more pictures. The code worked fine with one
or two but now it seems to occassionally "zoom" on a different picture from
the one selected... when clicking on each picture (each pic has the same
piece of code attached to it)


Option Explicit

Private myPic As Picture
Private dHeight As Double
Private dWidth As Double
Private RunWhen As Double
Private blStop As Boolean
Private Const cRunIntervalSecondi = 10 '\\ 10 sSeconds
Private Const cRunWhat = "RestorePicture"

'--------------
Public Sub Zoom_Pic()
Const ZoomFactor As Double = 10

If blStop Then
Exit Sub
End If

Set myPic = ActiveSheet.Pictures(Application.Caller)

With myPic
dWidth = .Width
dHeight = .Height
.Width = ZoomFactor * dWidth
.Height = ZoomFactor * dHeight
.BringToFront
blStop = True
End With

RunWhen = Now + TimeSerial(0, 0, cRunIntervalSecondi)
Application.OnTime EarliestTime:=RunWhen, _
Procedu=cRunWhat, _
Schedule:=True
End Sub

'--------------
Public Sub RestorePicture()

With myPic
.Width = dWidth
.Height = dHeight
End With

blStop = False

End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OT] Norman Jones? pippo[_2_] Excel Programming 5 September 7th 07 11:24 PM
Convert SMITH to Smith and JONES to Jones? Robert Judge Excel Worksheet Functions 3 June 12th 07 02:26 PM
NORMAN JONES - WHEREFORE ART THEY ARE YOU [email protected] Excel Programming 0 April 16th 07 12:36 AM
numbers contain hyphens(norman jones) bill gras Excel Programming 5 August 13th 05 12:40 AM
Thanks Norman Jones... You are a Genius KJ Excel Programming 0 July 23rd 05 12:04 AM


All times are GMT +1. The time now is 09:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"