I have created a excel template which has a button that i click to save automatically safe the file with a specific file name to the active directory. Before the file is saved I'd like to check if the filename contains the ProjectName, if it does it should continue to save the file, if not I'd like to be prompted where to save the file to. If current save as macro is below. Any assistance will be much appreciated.
Sub SaveAS()
' SaveAS Macro
'
Dim ProjectName As String
WbP = ActiveWorkbook.Path
ProjectName = Cells(5, 6)
'
ActiveWorkbook.SaveAS Filename:=ProjectName & "_Estimate", FileFormat:=52
End Sub
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
----------------------------------
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
----------------------------------
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
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar