Obliger de clicker deux fois

  • Initiateur de la discussion didic
  • Date de début
D

didic

Guest
Bonjour,

j'ai un problème avec une image.j'ai la procédure ci-dessous comme procédure de ma feuille :

Private Sub monimage_mousedown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
Call monimage(x, y)
End Sub

et la procédure suivante dans un module:

Sub monimage(ByVal x As Single, ByVal y As Single)
Worksheets('mafeuille').ScrollArea = 'A1:p1000'
Dim hwnd As Long
Dim Cmdb As CommandBar
If x < 46.5 Then
Application.ScreenUpdating = False
For Each Cmdb In Application.CommandBars
Cmdb.Enabled = False
Next Cmdb
Worksheets('mafeuille').monimage.Picture = LoadPicture('limage')
Worksheets('mafeuille').monimage.Top = 557.25
Range('Z1').Value = limage
Range('Z2').Value = 557.25
hwnd = FindWindow('Shell_traywnd', '')
SetWindowPos hwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW
Application.DisplayFullScreen = True
Application.Goto Reference:=Range('A1'), Scroll:=True
Range('B2').Select
Worksheets('mafeuille').ScrollArea = rabge('Z3').value
Application.ScreenUpdating = True
End If
End Sub

et je suis obliger de clicker 2 fois sur 'monimage' pour que ce soit pris en compte.
Comment pourrais-je y remédier?
Merci de vos solutions
didic
 

Discussions similaires

Statistiques des forums

Discussions
314 063
Messages
2 105 241
Membres
109 301
dernier inscrit
géogran