UserForm Autosave

Pedro Mendes

New Member
Joined
Jun 8, 2021
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello all,

I am quite new to this VBA world and still trying to figure out a lot of things.
I have been searching, but didn't manage to find what I am looking for. So as the subject indicates, I am trying to figure out if there is a way to autosave the input data from a textbox to the spreadsheet without the need of click a save button.

For example lets say that i have a UserForm with 1 TextBox.
And on that TextBox i will input the number 1.
is there a routine that can be coded so that "1" in the TextBox be autosaved to sheet1 cell A1 without any input (click save button for example) from the user?

Thank you all, and wish you a wonderful day.

Regards,
Pedro Mendes
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You can use something like this:
VBA Code:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    Sheet1.Range("A1") = TextBox1.Value
End Sub
You enter a value in TextBox1 and press the RETURN key. This will only work if your userform contains more than one texbox or other object.
 
Upvote 0
Solution
You are very welcome. :)
 
Upvote 0

Forum statistics

Threads
1,214,422
Messages
6,119,396
Members
448,891
Latest member
tpierce

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