Caranya:
Masuk ke visual basic editor, terletak di Menu Tools > Visual Basic Editor, atau dengan cara menekan bersama key Alt + F11. Setelah itu klik kanan Normal, kemudian insert module, kemudian akan muncul jendela untuk mengetik program (source code).
Ketik kode dibawa ini didalam jendela source code.
Sub fileprint()
Dim txtpass
Dim txtmasuk
txtmasuk = "briwates"
txtpass = InputBox("Masukan Password", "Printer Dipassword")
if txtpass = ""
Then Exit Sub
If txtpass = txtmasuk
Then
Dialogs(wdDialogFilePrint).Show
Else
MsgBox "Password Salah !!!", vbCritical, "Warning...."
End If
End Sub
Setelah selesai klik File > Save, tutup jendela visual basic editor.
Silahkan dicoba.
Untuk mengubah password, anda harus masuk ke visual basic editor dan mengubah
txtmasuk = "briwates" menjadi txtmasuk = "xxxxxx". xxxxxx tererah anda.
Dan bila anda mau lebih extrem lagi anda juga harus membuat password pada visual basic editor, dengan cara :
klik kanan pada Normal , klik Normal Properties, klik tab protection, klik pada lock project for viewing, isi password dan confirm password, then klik OK.
Jangan sampai lupa passwordnya, bisa gawat.
Sekali lagi selamat mencoba.
by h2o
!!! WARNING !!!
I HOLD NO RESPONSIBILITY FOR EVERY ACTION YOU DO via
THE INFORMATION SUPPLIED HERE
THIS FOR EDUCATIONAL PURPOSE ONLY
USE AT YOUR OWN RISK
YOU HAVE BEEN WARNED
I HOLD NO RESPONSIBILITY FOR EVERY ACTION YOU DO via
THE INFORMATION SUPPLIED HERE
THIS FOR EDUCATIONAL PURPOSE ONLY
USE AT YOUR OWN RISK
YOU HAVE BEEN WARNED
Tidak ada komentar:
Posting Komentar