<font class="small">Code:</font><hr /><pre>
Set x2= CreateObject("Excel.Application")
This opens the password protected excel file (the pricegrabber.xls is protected protected by password 12345).
Is there a way to encrypt the password when passing it through the code? [img]/images/graemlins/confused.gif[/img] i.e. I don't want to show the 12345 password.
Dani, You can encrypt the password using that but there is nothing to decrypt. In the end the password has to be used in an unencrypted form. QTP internal methods like SetSecure can understand and decrypt the encrypted string before using but this does not apply to non-QTP based methods.
guys is there any way to solve this by writing a DLL ?
I never used/wrote DLLs and I need some help on this.
I can write a small VBScript in Visual Basic and save it as a DLL file .However I don't know how to invoke this DLL in my QTP script , especially when opening an Excel file with protected password as mentioned above.
Could any one shed some light on this?