Hello everyone, I am trying to get user's passwords in a way so that they can enter it securely. One way is to simply create a form add a lable, add a textbox, and then a button, and then set the 'PasswordChar' property to "*", like such.
Programming.png
BUT, the problem, or lets say preferred way here is that I want all this to be in a single module, not two or three parts, just so it would make copying and pasting it later on easy, as easy as copying the whole project in a single go.
At first I decided to construct the whole form, or input form, programmatically in the module itself, the problem with that solution is that it requires that some security settings should be changed so that it allows using VBProject to manipulate project objects from VB, which is not enjoyable, finally I found this solution on mrexcel.com:
Now the problem with this code is that in newer versions of office, on 64bit machines it says that it needs 'PtrSafe' to declare windows API functions and subs. Now when I use aPlease Login or Register to view this content.
According to https://docs.microsoft.com/en-us/off...trsafe-keywordPlease Login or Register to view this content.
so the declration section has now become like this:
I am getting "Compile Error: Type Mismatch" error, when this line executes:Please Login or Register to view this content.
here is a sample workbook with the problematic section: Pass_Inbox.xlsmPlease Login or Register to view this content.
Now I am stuck and I don't know what to do. This code was just running fine on my somewhat older office, on my laptop, but when I brought it to company machine with office 2016 64bit, now it is not working because of type mismatch error. I don't know what to do, please help me with this pain in the neck problem I have exhausted all things I could think of and the reason why I am here. This is my ultimate final resort.
Bookmarks