slimbx
asked on
Refreshing Files/Opening files
#1) I have an application that I am creating, similiar to that of the Windows Explorer. Whenever I choose a file to open or rename or something of that nature, when that task is done, that is the only file that shows in the File List box. This happens when there are other files in the same directory. How can I display the rest of the files as well?
I have tried refreshing the File List ctrl, Drive crtl, the form itself, everything. I am stumped.
#2 How can you open any MS Office file (Word, Access, Excel, Powerpoint, Outlook), as well as any other file that is of ASCII text origin?
For this one, I have tried the ShellExecute, and it only opens txt files. Code below:
Dim ret As Long
ret = ShellExecute(Me.hwnd, vbNullString, File1.FileName, vbNullString, CurDir, 1)
* File1.FileName is the file to be opened from the list box
I have tried refreshing the File List ctrl, Drive crtl, the form itself, everything. I am stumped.
#2 How can you open any MS Office file (Word, Access, Excel, Powerpoint, Outlook), as well as any other file that is of ASCII text origin?
For this one, I have tried the ShellExecute, and it only opens txt files. Code below:
Dim ret As Long
ret = ShellExecute(Me.hwnd, vbNullString, File1.FileName, vbNullString, CurDir, 1)
* File1.FileName is the file to be opened from the list box
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>I was refreshing the wrong File List
hehe, happens to me every once in a while ;-))
-vik-
hehe, happens to me every once in a while ;-))
-vik-
ASKER
I figured out the refresh problem that I was having. I was refreshing the wrong File List (dumb mistake). The answer you provided was excellent. Thanks alot.
slimbx