Make a new variable on click in my.setting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ervin21
    New Member
    • May 2007
    • 9

    Make a new variable on click in my.setting

    ok.. any help is greatly appreciated!
    I have a button and when I click it i want it to make a new variable or setting in my.setting.. how do i do that. I also want it so that the first one is test1 then if test1 is already there i want it to be test2 and so on.. please help me thanks!
    also I'm a newb and only in high school so any help is great and please detailed!
  • ervin21
    New Member
    • May 2007
    • 9

    #2
    can anyone help me?? please.. if I need to clarify please tell me.

    Comment

    • ervin21
      New Member
      • May 2007
      • 9

      #3
      anyone?? is this not possible or something??

      Comment

      • dthompson
        New Member
        • May 2007
        • 8

        #4
        I think a bit more clarity is needed, not quite sure what you want the result to be. Creating new variables is unlikely, a new object however is feasible. Perhaps sketch out what you are trying to achieve.

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Also, don't be too impatient.

          What we have "here" is a bunch of people around the world, in various timezones, who volunteer their own time to help out those in need. We can't guarantee a quick turnaround on every question. :)

          Comment

          • ervin21
            New Member
            • May 2007
            • 9

            #6
            Ok.. I want to be able to click this button in a form and have it create a new "setting or variable" (not sure exactly what it is called) in the my.settings
            After I do this command I should be able to assign the my.settings.nam eofsettingorvar iable and use it.

            This would do the same thing as it would if I went to my program properties and added one in the settings tab. (hopefully)

            After i figure this out i want to be able to make a new on everytime i click this. for example the first click it will make the variable "test1" then if i click it again it will say something like if test1 already exists then make test2 and so on. That way there can be as many test variables as they click it.

            Thank you

            Comment

            • dthompson
              New Member
              • May 2007
              • 8

              #7
              I think I understand what you're trying to achieve, howvever not to my knowledge is it possible to at runtime add new variables to the Settings of your project. Settings variables seem to be designed to serve the purpose of storing user customizable data entered during runtime.
              Question, do you need the info entered into the "Test" variable stored for when the app. is re-run, or do you just need a new variable each time the button is clicked. If the later is true perhaps an array is best suited, this allows you to increment the array record number each time the button is clicked in theory giving you a new variable. A listbox would also give you this functionality and may be less restrictive. Option 2. If you need the info to be kept for the next run, you could use a old style data file to add info to and retrieve.

              Comment

              • ervin21
                New Member
                • May 2007
                • 9

                #8
                Originally posted by dthompson
                I think I understand what you're trying to achieve, howvever not to my knowledge is it possible to at runtime add new variables to the Settings of your project. Settings variables seem to be designed to serve the purpose of storing user customizable data entered during runtime.
                Question, do you need the info entered into the "Test" variable stored for when the app. is re-run, or do you just need a new variable each time the button is clicked. If the later is true perhaps an array is best suited, this allows you to increment the array record number each time the button is clicked in theory giving you a new variable. A listbox would also give you this functionality and may be less restrictive. Option 2. If you need the info to be kept for the next run, you could use a old style data file to add info to and retrieve.
                thanks for the help.
                yes i need it saved for when i re-run. Do you know a site that can help me with how to set up a data file and how to easily use it. Or can you tell me? thanks

                Comment

                • ervin21
                  New Member
                  • May 2007
                  • 9

                  #9
                  can anyone help me out?

                  Comment

                  Working...