+ Reply to Thread
Results 1 to 9 of 9

buttons & userforms - saving data?

  1. #1
    Registered User
    Join Date
    04-23-2010
    Location
    switzerland
    MS-Off Ver
    Excel 2007
    Posts
    4

    buttons & userforms - saving data?

    Hello,

    Im trying to create a spreadsheet consisting of buttons and userforms 'behind' each button.

    I have the button and the userform and both work, but it doesnt save the info - is this possible to do? (ie, everytime you click on the button the same data appears once entered)

    If this isnt possible, is it possible to have a 'form' attached to a button that has some data that is entered and then stored?

    im a beginner so im also looking to learn the code that makes this all work!

    thanks!

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: buttons & userforms - saving data?

    I'm not sure what you want, here's a sample dataform

    http://excel-it.com/vba_examples.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    04-23-2010
    Location
    switzerland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: buttons & userforms - saving data?

    well what i'd like to do is this:

    Imagine a blank page with x no. of buttons. Each button you click opens up a form, and on that form there is data that is manually inputted by the user.

    The next time the user clicks on the same button, up comes the form with the data that was inputted..

    in my mind it must be possible but i cannot find the code or an example which is similar..

    I dont really want to save the data to a another sheet, but if thats the only way to do it then ok..but i need the function when the buttons are clicked they call up the data that was originally assigned..

    maybe a userform isnt the way to go about this?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: buttons & userforms - saving data?

    1. It's a waste of effort creating forms for each button
    2. Any data has to be stored somewhere, it can't be retained by the userform normally

    Attach an example workbook

  5. #5
    Registered User
    Join Date
    04-23-2010
    Location
    switzerland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: buttons & userforms - saving data?

    "1. It's a waste of effort creating forms for each button
    2. Any data has to be stored somewhere, it can't be retained by the userform normally

    Attach an example workbook"

    Hello,

    Thanks but i disagree. As i mentioned i am a total beginner so im kind of looking for hints and tips, for the moment there is no spreadsheet in existance..i have just been playing about trying to understand how it all functions.

    I thought if i created the macro i could then just draw a button as & when i wish and attach the macro - i dont see why that is a waste of effort. Anyway as for every button the information is going to be different it has to be done at one stage or another?!

    The idea is to create a visual list of our wine. Thus every button represents a bottle with all the data about that wine.

    When looking for wine to drink we can then just click on the buttons and up comes a window or form with the data. Also within the form or page or whatever we thought to have the date to drink by to help us organise the wine..

    If userforms arent the way to go, what is the best way to approach this?

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: buttons & userforms - saving data?

    Seems you know best, maybe use cell Comments with pictures inserted

  7. #7
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,522

    Re: buttons & userforms - saving data?

    First of, I would never disagree with royUK. He knows more about Excel then you and I ever will know.

    But maybe the attached is a starting point for you. You can enter all the wines available in Switzerland (and anywhere else for that matter) in it and make your pick.

    If you were so inclined, you could even have a picture of the bottle appear in the userform.

    Good Luck

    HTH

    John
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-23-2010
    Location
    switzerland
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: buttons & userforms - saving data?

    thanks!

    no doubt he knows alot about it, he just doesnt have a very good 'bedside manner'

    no hard feelings though.

    thanks for the sheet, i will play about & see what i can do!

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: buttons & userforms - saving data?

    I can't wait to see how you overcome what seems to be the major requirement getting the form toload with previous data,unless it is actually stored somewhere

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1