AndreMichielsen
New Member
- Joined
- May 5, 2021
- Messages
- 8
- Office Version
- 365
- Platform
- Windows
Hello,
I have a problem with selecting the right sheet with VBA.
I have a workbook with a form made in sheet 1
I have a workbook with all the months of the Year, i.e. January, February and so on.
I made a form in which one can fill some data and in one specific cell the date you want something done.
After completing the formdata, with one push on a button I open another workbook, save the data and close it again.
But in the macro I made I have to mention the specific name of the month to save the data.
All I want is that the month name of the cell in the form is compared to the right sheet name in the other workbook and so save the data in the right sheet, before closing the workbook again.
After that i clear the form and can start fill it again with new data.
What i can't find is how to select the right sheet according to the month name in the cell on the form.
I have a problem with selecting the right sheet with VBA.
I have a workbook with a form made in sheet 1
I have a workbook with all the months of the Year, i.e. January, February and so on.
I made a form in which one can fill some data and in one specific cell the date you want something done.
After completing the formdata, with one push on a button I open another workbook, save the data and close it again.
But in the macro I made I have to mention the specific name of the month to save the data.
All I want is that the month name of the cell in the form is compared to the right sheet name in the other workbook and so save the data in the right sheet, before closing the workbook again.
After that i clear the form and can start fill it again with new data.
What i can't find is how to select the right sheet according to the month name in the cell on the form.