Thread: Macro in 2000
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
kounoike[_2_] kounoike[_2_] is offline
external usenet poster
 
Posts: 126
Default Macro in 2000

documents for BrowseFolder is here

http://msdn.microsoft.com/library/de...eforfolder.asp

and do you want just to open file like from explore or
want to get a file name to open?

if just want to open, then

Sub fnShellExploreVB()
Dim objShell As Object

Set objShell = CreateObject("Shell.Application")
objShell.Explore (0)
Set objShell = Nothing
End Sub

will open the file.

but want to get a file name to open, i think it's better to use
Application.GetOpenFilename like

sub test1()
fileToOpen = Application.GetOpenFilename("all files (*.*), *.*")
If fileToOpen < False Then
MsgBox "select : " & fileToOpen
End If
end sub

keizi

"Naman.Patel" wrote in message
...
Thanks,

It is working fine and it has solved my problem.

but I want some more help on it. do u have ne help documents for this? I
need to open the file also..