Macro error on time reporting file... please help!

Not applicable

Hi y'all. I have a simple time reporting spreadsheet, and the macro loaded onto a command button. I get an error message. Can someone please help me with fixing it?


Here's how it works: On the "Time Input" tabs, the employee selects their name up top, the month, and pay period (which automatically gives pay period options depending on month chosen). Then, depending on Pay Period chosen, the two week pay period loads automatically on the table below it. The employee then input number of hours by day for each chosen project. They can choose up to 3 projects at a time. Once they hit "Post Hours", the macro is supposed to post the hours worked to each project to the employee's tab named after them. The macro is supposed to match employee chosen in C2 to the tab named after them and post the hours matching the date and project to the tab. I get an error message though. 


I'm sure for one of you it is a simple fix. Any help is greatly appreciated!! Thank you for your consideration!!!


3 Replies


The error occurs because there isn't a worksheet with the name "" in the file. Actually the name of a worksheet has to be at least one character e.g. "1" or "z".


@Quadruple_Pawn How would I fix this? I'm unable to contact the individual who wrote the macro for me...

best response


The code was written for the attached file. You accepted the answer to your question as best response.

VBA issue - Need code to match data elements between worksheets and a worksheet name and move/post - Microsoft Community Hub