Extra save

A

Andrew

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
 
T

Tom Ogilvy

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 said:
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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Save Macro 0
From Excel to user form 0
capture date at another sheets using Marlett 1
Insert code 2
Deleting specific information 1
Mixed format 5
Select Case code error 8
Conditional formating via VB 17

Top