Hi, could you help me here please, I think I know why it's happeneing, but I don't know how to fix it (I don't really know a great deal about VBA).
The error that is returned comes up as 1004
I think it is because the cell "I2" has a date in it, it is formatted to dd.mm.yy in the cell, but I'm guessing it needs to be formatted in the VBA too?
Cheers
Code:
Sub Monday()
'
' Monday Macro
'
Dim newFile As String, fName As String
fName = Range("H2").Value & Range("I2").Value
newFile = ("MLST_" & fName)
ChDir _
"S:\Manufacturing\Manufacturing Planning\MLSTs in use"
ActiveWorkbook.SaveCopyAs Filename:=newFile
Sheets(Array("MLST", "PKG")).Select
Sheets("MLST").Activate
ActiveWindow.SmallScroll Down:=-9
Range("K7:AB552").Select
ActiveWindow.SmallScroll Down:=24
Range("K7:AB552,K556:AB590").Select
Range("AB556").Activate
Selection.ClearContents
End Sub
The error that is returned comes up as 1004
I think it is because the cell "I2" has a date in it, it is formatted to dd.mm.yy in the cell, but I'm guessing it needs to be formatted in the VBA too?
Cheers