Sabtu, 26 November 2011

[ExcelVBA] Generate file name

 


I want excel to generate a file name based on values in 3 cells.
testname = range("a1").value& 
range("a2").value& range("a3").value
 

Then I want excel to show a "save as" - dialog box with this "testname" as a default in the file name field, let the user have an opportunity to change the file name (or accept) and then save it.
I have been looking on Application.GetSaveAsFilename but I'm not able to put the generated filename in the filename field. 
fullfilename = Application.GetSaveAsFilename(InitialFileName:=testname)

Hope some of you understand and can help me!
Torstein

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar