9 replies
An example would be the following VBA-code:
Sub SaveXLS()
Dim StrExName As String
Range("D1").Select
StrExName = Selection.Value
ActiveWorkbook.SaveAs Filename:= _
StrExName & ".xls", FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub
This assumes the name in cell D1.
It will save in the current (default) directory and assumes that the name would be without the extension .xls whichis added in the save. Elaboration is always possible.
A simple way to get this would be to record a very short macro with the recorder. Edit it and replace all text with the code above.
I do not know if you want to have it in a template or in a different way. You could connect it to a button added to one of the toolbars of the template with customize toolbars..
Look under the category all macros.
The _ would have to be at the end of a line, so some editing may be needed.
Good luck
by derek cullen
by popeye_doyle
by derek cullen
by popeye_doyle
http://www.geocities.com/kamranali5/microsoftexcelmacro.htm.
Try the same, in my original post there was a space in the URL.
by derek cullen
by gxh
by derek cullen
by derek cullen
This discussion is closed to new replies.
Trending Software posts
Sort by Trending