Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

help

1 réponse
Avatar
pedro
J’ai fais ce fichier pour travailler sur une feuille avec une userform active
ça marche bien mais je ne peux pas modifier les cellules je peux seulement
les sélectionné,
Il manque quoi pour que je puisse modifier les cellules.
Merci de votre aide

Pedro

Private Declare Function FindWindowA Lib "User32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function EnableWindow Lib "User32" _
(ByVal hWnd As Long, ByVal bEnable As Long) As Long

Private Declare Function GetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Sub UserForm_Activate()
EnableWindow FindWindowA("XLMAIN", Application.Caption), 1
End Sub

Private Sub UserForm_Initialize()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) Or &H20000
End Sub

1 réponse

Avatar
isabelle
bonjour Pedro,

mets la propriété ShowModal du UserForm à False
(ps/ pour xl2000 et + )

isabelle

pedro a écrit :
J’ai fais ce fichier pour travailler sur une feuille avec une userform active
ça marche bien mais je ne peux pas modifier les cellules je peux seulement
les sélectionné,
Il manque quoi pour que je puisse modifier les cellules.
Merci de votre aide

Pedro

Private Declare Function FindWindowA Lib "User32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function EnableWindow Lib "User32" _
(ByVal hWnd As Long, ByVal bEnable As Long) As Long

Private Declare Function GetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLongA Lib "User32" _
(ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Sub UserForm_Activate()
EnableWindow FindWindowA("XLMAIN", Application.Caption), 1
End Sub

Private Sub UserForm_Initialize()
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Me.Caption)
SetWindowLongA hWnd, -16, GetWindowLongA(hWnd, -16) Or &H20000
End Sub