ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extra save (https://www.excelbanter.com/excel-programming/292187-extra-save.html)

Andrew[_37_]

Extra save
 
hi Al
Below i have what i use to save a file as an i.d number once it has been updated by a workbook macro. Somehow i want to save the file as it's current name before this kicks in, but after it has updated the number. The text below is saved in the worksheet module

Private Sub Worksheet_Change(ByVal Target As Range
If Not Application.Intersect(Target, Range("I2")) Is Nothing The
ThisWorkbook.SaveAs Filename:="C:\My Documents\UW Forms\" & Target.Value, FileFormat:=xlWorkbookNorma
End I
End Su

The current path of the original file is "C:\My Documents\UW Forms\UW Template.xlt

Any Suggestions more than welcome

Thank


Tom Ogilvy

Extra save
 
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("I2")) Is Nothing Then
Application.DisplayAlerts = False
Thisworkbook.SaveAs Filename:= _
"C:\My Documents\UW Forms\UW Template.xlt", _
Fileformat = xlTemplate
Application.DisplayAlerts = True
ThisWorkbook.SaveAs Filename:="C:\My Documents\UW Forms\" & _
Target.Value, FileFormat:=xlWorkbookNormal
End If
End Sub

--
Regards,
Tom Ogilvy
_
"Andrew" wrote in message
...
hi All
Below i have what i use to save a file as an i.d number once it has been

updated by a workbook macro. Somehow i want to save the file as it's current
name before this kicks in, but after it has updated the number. The text
below is saved in the worksheet module:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("I2")) Is Nothing Then
ThisWorkbook.SaveAs Filename:="C:\My Documents\UW Forms\" & Target.Value,

FileFormat:=xlWorkbookNormal
End If
End Sub

The current path of the original file is "C:\My Documents\UW Forms\UW

Template.xlt"

Any Suggestions more than welcome.

Thanks





All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com