EXCEL MACRO – Save Document

03/03/2016 § Leave a comment

Snima fijl kao .XLSM

Sub SaveMe()
myFilename = InputBox(“Unesi ime fajla u formatu: YYYYMM” & vbNewLine & “” & vbNewLine & “Godina + sledeci mesec ” & vbNewLine & “” & vbNewLine & “npr:   201610”) & “_Breakage.xlsm”

myDir = ThisWorkbook.Path
ActiveWorkbook.SaveAs FileName:= _
myDir & “\” & myFilename, _
FileFormat:=52, Password:=””, WriteResPassword:=””, _
ReadOnlyRecommended:=False, CreateBackup:=False
CreateObject(“WScript.Shell”).Popup “Dokument je snimljen kao ” & vbCrLf & myDir & “\” & vbCrLf & myFilename, _
2, “PORUKA”
‘If user specified file name, perform Save and display msgbox

If filemyFilename <> False Then
ActiveWorkbook.SaveAs FileName:=fileSaveName, FileFormat:=52

MsgBox “Save as ” & fileSaveName
End If

End Sub

Advertisements

Tagged: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading EXCEL MACRO – Save Document at RheXenoR.

meta

%d bloggers like this: