Code khóa phím Shift

sinhvienpy89

Mỗi ngày 1 điều mới
Hội viên mới
Như chúng ta đã biết dùng Form đăng nhập để mà phân quyền sử dụng cho ngưòi dùng.Nhưng nó có một nhuợc điểm là chỉ cần nhấn phím SHIFT khi mở FIle là toàn bộ code bị bung ra hết.Do đó em cần Code để mà vô hiệu hóa phím SHIFT.[you] có hãy POST cho em tham khảo với.Em xin cảm ơn!
 
Ðề: Code khóa phím Shift

Cậu này hay nghịch máy tính quá ta, nhưng phải như vậy mới thành tài được
cái này anh sưu tầm thôi thử thử nha

' Function disables shift key

Public Function Disable_ShiftKey()
Dim db As Database
Dim prp, prptest As Property

On Error GoTo Err_Handler

Set db = CurrentDb

For Each prptest In db.Properties
If prptest.Name = "AllowBypassKey" Then
db.Properties.DELETE "AllowBypassKey"
Exit For
End If
Next prptest

Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False, True)
db.Properties.Append prp

db.Properties.Refresh

MsgBox "Disable Shift Key succeeded!", vbInformation

Set db = Nothing
Set prp = Nothing

Err_Exit:
Exit Function

Err_Handler:
MsgBox "Error " & Err.Number & " ! " & Err.description, vbCritical
Resume Err_Exit

End Function


' Function enables shift key

Public Function Enable_ShiftKey()
Dim db As Database
Dim prp, prptest As Property

On Error GoTo Err_Handler

Set db = CurrentDb

For Each prptest In db.Properties
If prptest.Name = "AllowBypassKey" Then
db.Properties.DELETE "AllowBypassKey"
Exit For
End If
Next prptest

Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, True, True)
db.Properties.Append prp

db.Properties.Refresh

MsgBox "Enable Shift Key succeeded!", vbInformation

Set db = Nothing
Set prp = Nothing

Err_Exit:
Exit Function

Err_Handler:
MsgBox "Error " & Err.Number & " ! " & Err.description, vbCritical
Resume Err_Exit

End Function

(sưu tầm )
 
Ðề: Code khóa phím Shift

Cậu này hay nghịch máy tính quá ta, nhưng phải như vậy mới thành tài được
cái này anh sưu tầm thôi thử thử nha

' Function disables shift key

Public Function Disable_ShiftKey()
Dim db As Database
Dim prp, prptest As Property

On Error GoTo Err_Handler

Set db = CurrentDb

For Each prptest In db.Properties
If prptest.Name = "AllowBypassKey" Then
db.Properties.DELETE "AllowBypassKey"
Exit For
End If
Next prptest

Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False, True)
db.Properties.Append prp

db.Properties.Refresh

MsgBox "Disable Shift Key succeeded!", vbInformation

Set db = Nothing
Set prp = Nothing

Err_Exit:
Exit Function

Err_Handler:
MsgBox "Error " & Err.Number & " ! " & Err.description, vbCritical
Resume Err_Exit

End Function


' Function enables shift key

Public Function Enable_ShiftKey()
Dim db As Database
Dim prp, prptest As Property

On Error GoTo Err_Handler

Set db = CurrentDb

For Each prptest In db.Properties
If prptest.Name = "AllowBypassKey" Then
db.Properties.DELETE "AllowBypassKey"
Exit For
End If
Next prptest

Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, True, True)
db.Properties.Append prp

db.Properties.Refresh

MsgBox "Enable Shift Key succeeded!", vbInformation

Set db = Nothing
Set prp = Nothing

Err_Exit:
Exit Function

Err_Handler:
MsgBox "Error " & Err.Number & " ! " & Err.description, vbCritical
Resume Err_Exit

End Function

(sưu tầm )

Khoá phím SHIFT thành công rồi mà bây giò tìm cách mở nó đây.Bạn có biết cách nào để mơ nó không?
 
Ðề: Code khóa phím Shift

Khoá phím SHIFT thành công rồi mà bây giò tìm cách mở nó đây.Bạn có biết cách nào để mơ nó không?
PHUYEN89 à: FormQuantri trong file Login mà anh gửi chú có cả khóa và mở shift đó.
formQuantrij có 4 đoạn code là:
- form_Opend: 1 là mật khẩu mở form.
- cmdDisableShift_click(): là khóa SHIFT
- cmdEnableShift_click(): là mở SHIFT
- cmdThoat_Click(): Thoát.
 
Ðề: Code khóa phím Shift

PHUYEN89 à: FormQuantri trong file Login mà anh gửi chú có cả khóa và mở shift đó.
formQuantrij có 4 đoạn code là:
- form_Opend: 1 là mật khẩu mở form.
- cmdDisableShift_click(): là khóa SHIFT
- cmdEnableShift_click(): là mở SHIFT
- cmdThoat_Click(): Thoát.
Anh quên là anh đã khoá VBA bằng đặt password rồi sao.Nếu không có VBA thì em đâu có hỏi nữa.Do đó mà em đâu có xem được nguồn của nó,cả mở và khoá luôn anh ah.Phần đỏi mật khẩu của anh thật hay nhưng em đâu có học được.
 
Ðề: Code khóa phím Shift

Anh quên là anh đã khoá VBA bằng đặt password rồi sao.Nếu không có VBA thì em đâu có hỏi nữa.Do đó mà em đâu có xem được nguồn của nó,cả mở và khoá luôn anh ah.Phần đỏi mật khẩu của anh thật hay nhưng em đâu có học được.
Xin lỗi nhé: Pass mở VBA và Pass Open formQuantri cùng là: ladieskiller. Anh có POST lên KHPT, anh tưởng chú cũng xem rồi.
 
Sửa lần cuối:

CẨM NANG KẾ TOÁN TRƯỞNG


Liên hệ: 090.6969.247

KÊNH YOUTUBE DKT

Cách làm file Excel quản lý lãi vay

Đăng ký kênh nhé cả nhà

SÁCH QUYẾT TOÁN THUẾ


Liên hệ: 090.6969.247

Top