Hi AB33

I did this;

empt = Sheets("SunDps").Cells(1, 4).Value
and also put
With ws
but it doesn't help. Even when I run macro from Visual Basic window's Run button, it works.