So I am trying to find the number of work days in a month given that the month is a user inputted integer.
so this is what assigns the month
[VBA]month = InputBox("Enter the month as an number (EX. If you want to enter for January then enter 1).", "Info", "99")[/VBA]
then i want to find the nubmer of work days from month/1/current year to the end of the month.
so i have
[VBA]startdate = month / 1 / 12
enddate = WorksheetFunction.EoMonth(startdate, 0)
workdaysinmonth = Application.WorksheetFunction.NetworkDays(startdate, enddate)[/VBA]
but it thinks i am trying to divide the month by one and by 12 and never gives me a date.
its like i need something like
[VBA]startdate = &month& #1/12#[/VBA]
but that is not recogized by vba.
please help