Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
A macro that can save a file?
Is it possible to make a macro the will save the current spreadsheet? I want to make a macro the will save the spreadsheet with the filenam A2_A3.xls So if A2 was "Bloggs" and A3 was "Joe" the file would save a Bloggs_Joe.xls I've allready made the macro clear certain cells but I've only don this by using the record macro function and editing out certain part cause I don't really understand visual basic Thanks in advance. Gle -- sir_gle ----------------------------------------------------------------------- sir_glen's Profile: http://www.excelforum.com/member.php...fo&userid=1476 View this thread: http://www.excelforum.com/showthread.php?threadid=27333 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
A macro that can save a file?
Something like
Dim FName As String FName = ActiveSheet.Range("a2") & "_" & ActiveSheet.Range("a3") ActiveWorkbook.SaveAs Filename:= _ FName, FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False should do it. Jan "sir_glen" skrev i en meddelelse ... Is it possible to make a macro the will save the current spreadsheet? I want to make a macro the will save the spreadsheet with the filename A2_A3.xls So if A2 was "Bloggs" and A3 was "Joe" the file would save as Bloggs_Joe.xls I've allready made the macro clear certain cells but I've only done this by using the record macro function and editing out certain parts cause I don't really understand visual basic Thanks in advance. Glen -- sir_glen ------------------------------------------------------------------------ sir_glen's Profile: http://www.excelforum.com/member.php...o&userid=14768 View this thread: http://www.excelforum.com/showthread...hreadid=273333 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Macro to Open File, Delete Contents, Save New File | Excel Discussion (Misc queries) | |||
Macro Save File (Unique file name) | Excel Worksheet Functions | |||
Using a macro to save a file. | Excel Programming | |||
Macro to insert values from a file and save another sheet as a .txt file | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |