![]() |
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 :confused: 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 |
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 :confused: 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 |
All times are GMT +1. The time now is 12:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com