Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When inputting data in a cell, 20 becomes .20. How do I change? | Setting up and Configuration of Excel | |||
Recalling more than one cell by inputting a single command | Excel Worksheet Functions | |||
Removing a date by inputting a newer one in another cell | New Users to Excel | |||
Cell not available when inputting formula | Excel Worksheet Functions | |||
Inputting cell value from source cell based on value in adjacent cell. | Excel Discussion (Misc queries) |