M
Mirja
Hello!
I need to find out the amount of days in a month with VBA.
The command needs to be linked with a sheet in another
workbook. If the cell within the sheet shows i.e.
February, than monthdays should be 28. So far I have the
following command which is used for the days of the
current month:
days = Day(DateSerial(Year(Date), Month(Date)+1, 0))
How can I change it? Can I refer to another workbook and
sheet for example the following
workbooks
("abc.xls").Sheets("abc").Range("R20"))?
Thx, Mirja
I need to find out the amount of days in a month with VBA.
The command needs to be linked with a sheet in another
workbook. If the cell within the sheet shows i.e.
February, than monthdays should be 28. So far I have the
following command which is used for the days of the
current month:
days = Day(DateSerial(Year(Date), Month(Date)+1, 0))
How can I change it? Can I refer to another workbook and
sheet for example the following
workbooks("abc.xls").Sheets("abc").Range("R20"))?
Thx, Mirja