Wondering if anyone can help as I've tried several times to create this functionality within excel.
Summary - The end user will place the applicable rear in a particular cell within designated cell on worksheet and push a macro button to copy last years holiday tracker and create a new worksheet, subsequently renaming the copied worksheet.
Problem - when trying to declare the applicable worksheet variable worksheet name in question I get a type mismatch error.
Appreciate if someone can help?
The below code is stumbling block when declaring the sheet in question.
Sub test()
Dim ws as worksheet
Dim wsn as string
wsn = sheets("procedures").range("a1").value
Set ws = wsn
ws.activate
End sub