Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default Inputting a filename into a cell

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Inputting a filename into a cell

Jamie,
Range("B3")=filenm

No need to select.

"Jamie" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When inputting data in a cell, 20 becomes .20. How do I change? DAC Setting up and Configuration of Excel 1 January 21st 10 07:05 PM
Recalling more than one cell by inputting a single command Luis Verdejo Excel Worksheet Functions 1 November 29th 09 06:51 AM
Removing a date by inputting a newer one in another cell Mike[_23_] New Users to Excel 4 July 14th 09 02:29 PM
Cell not available when inputting formula Lyn Excel Worksheet Functions 2 April 14th 09 06:38 PM
Inputting cell value from source cell based on value in adjacent cell. michaelberrier Excel Discussion (Misc queries) 3 December 9th 06 09:16 PM


All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"