I have 1 UserForm and want to save to different sheets in the same workbook

Ellendigitl00

New Member
Joined
Oct 23, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello all,

I think this topic has been discussed in many posts here and other forums. I'm sorry for the Clickbait (for some), however, I was unable to solve my problem....

I have a workbook to register my expenses, so I have a Sheet for every month of the year: so, first sheet is for January, second sheet is for February and so on (Please see the attached image). All of them have the same formatting (basically I just copied each sheet and changed the name)...
To simplify the process (and also because I was curious about VBA Userforms), I created a UserForm to fill every expense in each month: so I have 3 TextBox to Expense Description; Date and expense value (in €) and a ComboBox to the category of expense.

My main issue is how can I save the Data in different sheets (for each month) using the same UserForm?
I believe I only need to change the code when appears "Worksheets ("Sheet name"), right?

Your help is much appreciated!
 

Attachments

  • Excel_expenses.png
    Excel_expenses.png
    20.7 KB · Views: 16
Code does not simply get ignored. If that code worked before, and you have the relevant sheet active, it will do what it did before unless there is some other code interfering (e.g. it activates a different sheet).
I'm sorry I had another error in other line and was confusing with the "Activesheet".
Thank you for your assistance!
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,224,809
Messages
6,181,075
Members
453,020
Latest member
mattg2448

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top