Preserve the value of a textbox in VBA

infoufou -  
 infoufou -
Hello,

I am creating a VBA program that is meant to be used multiple times a week. I would therefore like to save the latest entries from my textboxes so that the user can retrieve the last values entered in the textbox fields. This way, the user can either update them or keep them and continue in the program.

Help me please......
Configuration: Windows XP Internet Explorer 6.0

8 answers

  1. infoufou
     
    nobody can help me, come on, a little effort please
    0
  2. melanie1324 Posted messages 1561 Status Member 156
     
    Hello,

    can you give me more details please?
    are you on Excel or Access?
    What exactly do you need?
    When do we enter the values into your textboxes?

    because to retrieve their value you can do:
    dim a as string

    a = textbox.value
    0
  3. infoufou
     
    No, actually I would like the value of the text boxes to be saved within the program, so that when the user uses the program again from the beginning, they find in the text boxes the values previously entered. This way, if they need to modify them, they can do so; otherwise, they just click the button to validate the already present data.
    0
  4. melanie1324 Posted messages 1561 Status Member 156
     
    Re,

    This is beyond my skills. And I am not sure that this is possible.

    However, what I would do in your place is to create a hidden sheet and put the values entered by the user there, so if there is nothing, your textboxes would be empty and if there is something, the previously entered data would be there.
    0
  5. infoufou
     
    I don't quite understand your approach, could you please elaborate?
    Thank you for your response, in any case.
    0
    1. pijaku Posted messages 13513 Registration date   Status Moderator Last intervention   2 773
       
      Hi,
      VBA okay but Excel or Access?
      It's important.
      In Excel, just store the latest values of your textboxes in a hidden sheet as recommended by melanie1324.
      --
      Best regards,

      -- What is worth doing is worth doing well --
      0
  6. infoufou
     
    Bien sûr, donne-moi simplement une phrase ou un texte à traduire et je m'en occuperai.
    0
    1. pijaku Posted messages 13513 Registration date   Status Moderator Last intervention   2 773
       
      Right away.......
      https://www.cjoint.com/?iApMGt8sgE

      You will find the different codes in:

      Private Sub UserForm_Initialize()

      Private Sub CommandButton1_Click()

      etc.
      --
      Best regards,

      -- What is worth doing is worth doing well --
      0
  7. infoufou
     
    nickel chrome

    thanks pijaku you're awesome
    0