Xuân Thanh > 21-03-14, 10:06 AM
hugox03 > 23-03-14, 11:58 PM
hugox03 > 10-04-14, 01:14 PM
hugox03 > 17-04-14, 12:34 AM
Option Compare Database
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function MessageBoxW Lib "user32" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long
Public Function msgBoxUni(ByVal PromptUni As Variant, Optional ByVal Buttons As VbMsgBoxStyle = vbOKOnly, Optional ByVal TitleUni As Variant = vbNullString) As VbMsgBoxResult
'BStrMsg,BStrTitle : La chuoi Unicode
Dim BStrMsg, BStrTitle
'Hàm StrConv Chuyen chuoi ve ma Unicode
BStrMsg = StrConv(PromptUni, vbUnicode)
BStrTitle = StrConv(TitleUni, vbUnicode)
msgBoxUni = MessageBoxW(GetActiveWindow, BStrMsg, BStrTitle, Buttons)
End Function
MTNQ > 21-04-14, 06:46 PM
#If VBA7 Then
Private Declare PtrSafe Function GetActiveWindow Lib "user32" () As LongPtr
Private Declare PtrSafe Function MessageBoxW Lib "user32" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As LongPtr
#Else
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function MessageBoxW Lib "user32" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long
#End If
hugox03 > 24-04-14, 04:42 PM
hugox03 > 28-04-14, 09:31 PM
nhannt4 > 28-04-14, 11:20 PM
MTNQ > 30-04-14, 01:56 PM
(28-04-14, 09:31 PM)hugox03 Đã viết: MatTroiNguQuen ơi ! giúp mình chỉnh lại code này với ! Thanks !
Bạn giải thích giùm mình tại sao phai bị lỗi trên ! khi mình test tren access 2007 hì không sao , vậy mà khi qua access 2010 ( 64 bit ) lại bị lỗi !