07-03-2009, 08:54 AM
Sure just use a string variable like FileName$ in the open statement instead of a literal value.
Create a menu display for the user and use SELECT CASE:
Then open the file: OPEN Filename$ FOR INPUT AS #1
Create a menu display for the user and use SELECT CASE:
Code:
DO: choice$ = INKEY$ : LOOP UNTIL choice$ <> ""
SELECT CASE choice$
    CASE "1": Filename$ = "ABCD.txt"
    CASE "2": Filename$ = "EFGH.txt"
END SELECT
Then open the file: OPEN Filename$ FOR INPUT AS #1
Get my QB demonstrator here: http://dl.dropbox.com/u/8440706/Q-Basics.zip