Bonjour,
Je ne comprends rien à ce type de message...
Je dois travailler sur un fichier excel qui a dû être réalisé sous excel 97 vers. 32bits.
A la maison j'ai excel 2010 en 64bits, et à l'ouverture j'ai des erreurs de compilation...
J'ai déjà remplacé "PtrSafe"... mais je ne comprends pas le reste du message d'erreur
Vous pouvez m'aider à corriger le script SVP ?
Private Declare PtrSafe FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare PtrSafe GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare PtrSafe SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare PtrSafe DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
Private Sub UserForm_Initialize()
On Error Resume Next
Dim hWnd As Long, Style As Long
hWnd = FindWindow(vbNullString, Me.Caption)
Style = GetWindowLong(hWnd, -16) And Not &HC00000
SetWindowLong hWnd, -16, Style
DrawMenuBar hWnd
End Sub
Je ne comprends rien à ce type de message...
Je dois travailler sur un fichier excel qui a dû être réalisé sous excel 97 vers. 32bits.
A la maison j'ai excel 2010 en 64bits, et à l'ouverture j'ai des erreurs de compilation...
J'ai déjà remplacé "PtrSafe"... mais je ne comprends pas le reste du message d'erreur
Vous pouvez m'aider à corriger le script SVP ?
Private Declare PtrSafe FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare PtrSafe GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare PtrSafe SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare PtrSafe DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
Private Sub UserForm_Initialize()
On Error Resume Next
Dim hWnd As Long, Style As Long
hWnd = FindWindow(vbNullString, Me.Caption)
Style = GetWindowLong(hWnd, -16) And Not &HC00000
SetWindowLong hWnd, -16, Style
DrawMenuBar hWnd
End Sub
Pièces jointes
Dernière édition: