PDA

View Full Version : Solved: problem in opening a specific filename



rafi_07max
11-21-2010, 07:21 AM
http://yfrog.com/2g79530888j

From the picture we can see a combobox and a button. What I need to do now is that once I select a combobox and hit the button. I should able to retrieve a file by the name that is exactly same as the combobox name. For e.g. when I select “testorder” combobox, I should able to select a file name that has to be by the name of “testorder”.

So If I select a filename that is not same as the combobox name, then there will be a message pop out saying “Not a valid filename”.

I have created all the codes to do this for the combobox. Value = ”testorder” and there is no error in my program, but it is not opening the file.

I have attached a sample workbook with all my codes and a testorder file which I need to open

4950

p45cal
11-21-2010, 08:12 AM
A filename which has no extension seems to be picked up by GetOpenFilename with a dot at the end.

rafi_07max
11-21-2010, 05:52 PM
Thanks p45cal for your help. it worked :)