upload file name

G

Guest

is it possible to have a upload feature in excel...like, click "browse" it
opens a list of files from a certain folder, you click open and it puts the
file name into cell A1?
i dont want to upload the file..just have the file name go into A1

thanks in advance
 
B

Bob Phillips

fileToOpen = Application _
.GetOpenFilename("Microsoft Excel Files (*.xls), *.xls")
If fileToOpen <> False Then
Range("A1").Value = fileToOpenEnd If
--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

if its jpeg files i need instead would i just change it to

fileToOpen = Application _
 
B

Bob Phillips

Not quite, JPEg files have a jpg extension

Dim filetoopen

filetoopen = Application _
.GetOpenFilename("JPEG Files (*.jpg), *.jpg")
If filetoopen <> False Then
Range("A1").Value = filetoopen
End If

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top