View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Roy Harrill Roy Harrill is offline
external usenet poster
 
Posts: 14
Default How to capture file name in a folder?

Try this --

Sub GetPPT()

Dim f as string
f = Dir("C:\whatever\*.ppt")

End Sub


"Gregg" wrote in message
ups.com...
In a folder exists one .ppt file and a non .ppt file. In vba I want to
capture the name of the ppt file. Can someone tell me the best way to
do that?

For example, the path is c:\whatever and the ppt name might be
anything. I just want the name of the ppt file, not the other file.

Thanks.