martha555
08-09-2005, 12:27 AM
:whistle:
I have two requirements.
1. I have created a file named "abc100.xls". I have another excel file "main.xls", where I have written a macro to extract a value from file "abc100.xls". The problem is, that this file is password protected, hence when I try retrieving the value, I have to first enter the password. I want to enter the password in the macro itself, i.e., while opening the file.
2. secondly, the name of the file "abc100.xls" is stored in a variable. I want to extract only the numeric part of it(100), as this forms part of my password. My password contains a few characters followed by the file number(i.e., "n0100") in my case. Please help.
I have two requirements.
1. I have created a file named "abc100.xls". I have another excel file "main.xls", where I have written a macro to extract a value from file "abc100.xls". The problem is, that this file is password protected, hence when I try retrieving the value, I have to first enter the password. I want to enter the password in the macro itself, i.e., while opening the file.
2. secondly, the name of the file "abc100.xls" is stored in a variable. I want to extract only the numeric part of it(100), as this forms part of my password. My password contains a few characters followed by the file number(i.e., "n0100") in my case. Please help.