A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Variable File Naming Using Macros



 
 
Thread Tools Display Modes
  #1  
Old August 21st, 2004, 05:15 AM
Kris S
external usenet poster
 
Posts: n/a
Default Variable File Naming Using Macros

Is there a way to open a file and rename it using cells within the document
itself using a macro? (Variable File Name?)

Also, is there a way to open a file, using a macro again, by using criteria
on a cell in an open worksheet? (Variable File Call?)
  #2  
Old August 21st, 2004, 08:36 AM
Frank Kabel
external usenet poster
 
Posts: n/a
Default

Hi
yes you can do this. e.g.
sub save_it()
with activesheet.range("A1")
activeworkbook.saveas filename:= "C:\temp\" & .value & ".xls"
end with
end sub


Similar with opening workbooks. See workbooks.open in the vBA help




--
Regards
Frank Kabel
Frankfurt, Germany


Kris S wrote:
Is there a way to open a file and rename it using cells within the
document itself using a macro? (Variable File Name?)

Also, is there a way to open a file, using a macro again, by using
criteria on a cell in an open worksheet? (Variable File Call?)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT: Mailing rule problems of filing in outlook express and hard copy file systems in real case Teres Outlook Express 7 August 14th, 2004 01:55 AM
Importing pst file doesn't bring in my calendar and contacts Jackie Contacts 6 August 5th, 2004 02:40 AM
Continual Error 1321 Trying to Install Office 2003 Chad Harris General Discussions 9 June 11th, 2004 08:19 AM
Unsafe Attachments Ron Installation & Setup 2 June 9th, 2004 01:55 AM
Toolbar macros, Personal.xls and the .xlb file David Brand Setting up and Configuration 2 October 30th, 2003 02:51 PM


All times are GMT +1. The time now is 05:32 PM.


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