PDA

View Full Version : create .xls file from false condition



Dipwind
03-18-2007, 02:41 PM
Hello,

I want to create a .xls file in a specific location and a specific name after a cell in my spreadsheet turns non blank.

in each row same column the file name changes, row9 file name "Issue 1", row10 file name "Issue 2" etc etc..

Is that Possible?

all help is appreciated
Jo

mdmackillop
03-18-2007, 03:31 PM
This is most simply done by the cell which is changed. It's possible to do this where a cell is modified by a change elsewhere, but a bit more complicated.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 10 Then Exit Sub
If Target.Column = 5 Then
Set WB = Workbooks.Add
WB.SaveAs "G:\Issue " & Target.Row - 9 & ".xls"
WB.Close
Set WB = Nothing
End If
End Sub