How do i return the year only in a cell from a monthview calendar in a userform.
Currently using the current code, where icnt refers to the last row in the sheet plus 1 and the values are yielded from a userform
"
With Sheets("Register")
.Cells(iCNT, 1) = Calendar.Value
.Cells(iCNT, 2) = iCNT - 99
.Cells(iCNT, 3) = frmData.txtWO
.Cells(iCNT, 4) = cmbREV.Value
.Cells(iCNT, 5) = cmbAREA.Value
.Cells(iCNT, 6) = cmbUNIT.Value
.Cells(iCNT, 7) = frmData.txtEQUIPMENT
.Cells(iCNT, 8) = cmbTYPE1.Value
.Cells(iCNT, 9) = cmbTYPE2.Value
"
For cell (icnt,1), i want a code that returns the year as selected in the monthview calendar. Not the entire date in DD/MM/YY format. Also, if i wanted to return the date in a different format, ie YYMMDD how would i write this code?
Currently using the current code, where icnt refers to the last row in the sheet plus 1 and the values are yielded from a userform
"
With Sheets("Register")
.Cells(iCNT, 1) = Calendar.Value
.Cells(iCNT, 2) = iCNT - 99
.Cells(iCNT, 3) = frmData.txtWO
.Cells(iCNT, 4) = cmbREV.Value
.Cells(iCNT, 5) = cmbAREA.Value
.Cells(iCNT, 6) = cmbUNIT.Value
.Cells(iCNT, 7) = frmData.txtEQUIPMENT
.Cells(iCNT, 8) = cmbTYPE1.Value
.Cells(iCNT, 9) = cmbTYPE2.Value
"
For cell (icnt,1), i want a code that returns the year as selected in the monthview calendar. Not the entire date in DD/MM/YY format. Also, if i wanted to return the date in a different format, ie YYMMDD how would i write this code?