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

I have a form that I save under a new filename each time
it is filled out. I would like to record a macro that
saves the file with a name that represents the text in a
certain cell.
Example: Cell A1 contains the name of a customer/job,
lets say Smith22. I would like a macro to automatically
save the file with a filename of Smith22.xls.
The macro would be assigned to a button next to the cell.
Is this possible?
Thanks!
Jeff R
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default cell contents as filename

Application.DisplayAlerts = False
thisworkbook.SaveAs ThisWorkbook.Path & "\" & _
ThisWorkbook.Worksheets("Sheet1").Range("A1").Valu e & _
".xls"
Application.DisplayAlerts = True

--
Regards,
Tom Ogilvy

"Jeff R" wrote in message
...
I have a form that I save under a new filename each time
it is filled out. I would like to record a macro that
saves the file with a name that represents the text in a
certain cell.
Example: Cell A1 contains the name of a customer/job,
lets say Smith22. I would like a macro to automatically
save the file with a filename of Smith22.xls.
The macro would be assigned to a button next to the cell.
Is this possible?
Thanks!
Jeff R



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
Create filename based on cell contents JR Hester Excel Worksheet Functions 7 April 4th 07 11:34 PM
Vlookup Cell Contents Filename deeds Excel Worksheet Functions 1 March 12th 07 07:21 PM
Cell Contents to identify source Filename ThalesNate Excel Discussion (Misc queries) 1 June 7th 06 07:28 PM
Multiple If's, one variable. And filename as cell contents steve Excel Programming 0 September 10th 03 07:36 PM
Multiple If's, one variable. And filename as cell contents hugh jass Excel Programming 0 September 10th 03 07:18 PM


All times are GMT +1. The time now is 05:01 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"