I've worked a bit more on the vba coding but it still doesn't work
Here's what I've came up with
Sub DailyUpdate()
Const sBASE_NAME = "Deals "
Const sB = "B"
Const sA = "A"
Dim sDateName As String
Dim wksNew As Worksheet
If WorksheetFunction.Weekday(Now(), 2) = 1 Then
sDateName = Format(Now() - 3, "dd-mm-yyyy")
Else
sDateName = Format(Now() - 1, "dd-mm-yyyy")
End If
Set wksNew = Worksheets.Add(after:=Sheets(5))
wksNew.Name = sBASE_NAME & sDateName
Set dlsheet = appexcel.Workbooks.Open(sB & sA & ".xls")
With dlsheet
.Sheets("Sheet1").Range("B2:BF20100").Copy
End With
Workbooks("Macro WIP.xls").Worksheets(sBASE_NAME & sDateName).Activate
ActiveSheet.Paste
Columns("K:K").Select
Selection.Replace What:=" ", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
But it doesn't work. It gives me runtime error, object not defined...
Could you guys help me with that?
Cheers
Hugo
Bookmarks