Save Userform content to active sheet.

pr1nce

New Member
Joined
Feb 20, 2015
Messages
4
Hi Guys,

I have a feeling this will be incredibly simple and I am just unable to put the right search terms together to find my answer.

I currently have a workbook with 1 sheet and several VBA buttons that open different Userform. Then we enter information and hit save to save in a particular box on that sheet. Very simple stuff.

What I am unable to do so far is copy this sheet many times and have the Userform save to whatever sheet the person using it is in.

Some background to help understand: we are currently a few people using the doc separately, but instead I want to make the doc Shared and with 1 sheet per user. So when person A is on the sheet with their name and uses the userform, it will save to Person A sheet. Currently the code contains

Code:
Private Sub ButtonSave_Click()


    Dim emptyRow As Long


    'Make Sheet1 active
    Sheet1.Activate
Im assuming this is what will have to be modified?

Hope I am clear,

Thanks to anyone for their help!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
From what i understood i think that you just have to call the sheet that belongs to the person is using the userform, somenthing like this before all other code you may have:

Thisworkbook.Sheets("Sheet_Name_Here").Activate
 
Upvote 0
The problem with that is I would have to create a userform for each sheet. I want to use the same userform, but save on whatever sheet is active when the button is clicked.
 
Upvote 0

Forum statistics

Threads
1,216,186
Messages
6,129,393
Members
449,507
Latest member
rjwalker1973

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