excel - Range not working across sheets -
i have below code in vba. issue below code range referring data
sheet , in other sheet fails.
monthname = range("d5", range("d5").end(xltoright)).cells.count - 1
can please provide me solution wherein no matter in workbook range should pick data
sheet?
use
monthname = sheets("data").range("d5", sheets("data").range("d5").end(xltoright)).cells.count - 1
btw small search on forum or google have got answer.
Comments
Post a Comment