Hello All,
I am trying to open a file from a dialog box and then count the records in that file. I am able to accomplish this by actually hard coding the path, however, I need to be able to search for the file, then have the code look at the file and count the about of records that are in it.
I am trying to use this code to look for the file and then process it, however, it isn't working. Can anyone help?
I need to have this code:
Open "C:\Desktop\File 1.txt" For Input As # 1
Actually do this:
Application.FileDialog(msoFileDialogOpen).show For Input As # 1
Thanks in advance for your help.
I am trying to open a file from a dialog box and then count the records in that file. I am able to accomplish this by actually hard coding the path, however, I need to be able to search for the file, then have the code look at the file and count the about of records that are in it.
I am trying to use this code to look for the file and then process it, however, it isn't working. Can anyone help?
I need to have this code:
Open "C:\Desktop\File 1.txt" For Input As # 1
Actually do this:
Application.FileDialog(msoFileDialogOpen).show For Input As # 1
Thanks in advance for your help.