View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Inputting a filename into a cell

You can do this with formulae, which has the benefit of changing if the
filename changes. See http://www.xldynamic.com/source/xld.xlFAQ0002.html

--
HTH

Bob Phillips

"Jamie" wrote in message
...
Hi There

I have a macro that extracts attachments from outlook and saves them to a
folder by naming them after the person who sent the attachment, the time

and
the date. This is the line that creates the saveas filename.

filenm = Fldr.Items.Count & " " & olMi.SenderName & " " & "Date-" &

dattim
& ".xls"

The macro also opens the attachment once it has been saved and copies
certain cells into the spreadsheet that runs the extract macro. What I

need
to do is input the filename (filenm) into a cell on this spreadsheet as

well.


If I say range("B3").select what would I need to put next to paste in the
filename to this cell?

Any help would be greatfully appreciated.

Thanks in advance

Jamie