+ Reply to Thread
Results 1 to 9 of 9

Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

  1. #1
    Registered User
    Join Date
    11-24-2012
    Location
    Stratford-upon-Avon
    MS-Off Ver
    Excel 2007
    Posts
    89

    Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    I have followed the instruction (I think) to design a simple Userform design based upon the example from the link below. I cannot work out why my form does not do what the one in the example below. When I can get it working I can then modify it to my current project.

    [URL="http://msdn.microsoft.com/en-us/library/office/aa192538(v=office.11).aspx#officeexcel2003programminginsideoutch20_buildingawizard"]

    My TestForm is attached and any if you run it you will see the problems I am having compared with what it should do as shown in the link above.

    Regards

    Stratfordoaks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    You need to elaborate on it.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    11-24-2012
    Location
    Stratford-upon-Avon
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    Hi nathansav

    The form is started by running a macro and remains up until the user explicitly closes the form. Buttons on the form control which row of the worksheet is displayed through the form, and the form itself allows the user to enter or edit any data stored in a particular row.


    Thats what it should do! In my case I want it to auto populate the ID and Name textboxes from column A and B of the worksheet depending on the RowNumber value on the form. Also the rows of the sheet to be navigated by the First, Previous, Next and Last buttons. Data entered into the ID and Name text boxes should be able to be added to the worksheet with the 'Add' button.

    Does this help?

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    You must have:
    Please Login or Register  to view this content.
    at the start of your module. The Initialize event must be like this:
    Please Login or Register  to view this content.
    Also there are no buttons that call PutData.

  5. #5
    Registered User
    Join Date
    11-24-2012
    Location
    Stratford-upon-Avon
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    Thankyou Izandol.

    The PutData routine found in the user form module is similar to the GetData routine in that all the validations used to ensure that the value in RowNumber is valid are included. The main difference between the two routines is that the GetData routine copies information from the worksheet, whereas the PutData routine copies data to the worksheet.
    I have both the PutData and GetData in the form module with neither doing the above. The GetData routine is called on 'Initialize' but nothing shows in the text boxes. As you said PutData is not called anywhere. Have you any idea how I can make these two routines work automatically as they should?

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    Your form loads with the row number set to the first blank row therefore you have no data.

    PutData must be called by your Add or Save buttons (or both). I may also recommend that your buttons should have more useful names than CommandButton7 et cetera.

  7. #7
    Registered User
    Join Date
    11-24-2012
    Location
    Stratford-upon-Avon
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    I have added the call PutData to the Add and Save buttons but still no data will add to the worksheet when I enter a new row number and new name. Also no data populating the form as the row number is navigated by the previous and next buttons.

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    I recommend renaming your buttons:
    btnAdd
    btnSave
    btnCancel
    btnFirst
    btnPrevious
    btnLast
    btnNext

    You may then change the code to this for example:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-24-2012
    Location
    Stratford-upon-Avon
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Userform design from Microsoft Office Excel 2003 Programming Inside Out not working

    I can't thank you enough for your help Izandol. It works absolutely perfectly. I can now progress with it and add my combo's and calendar as it will end up as a form for the different sections at the golf club I manage to produce their fixtures diary for me to input onto our online calendar.

    Happy Christmas from

    Nigel at Stratfordoaks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Microsoft Office Help Viewer not working for Excel
    By NormanHarker in forum Excel General
    Replies: 1
    Last Post: 06-17-2013, 08:17 AM
  2. Microsoft Office XP excel 2003
    By FLYNNE in forum Excel General
    Replies: 2
    Last Post: 10-29-2005, 11:05 PM
  3. [SOLVED] Want to buy just EXCEL 2003 not the entire microsoft office suite
    By Jeffrey Brown in forum Excel General
    Replies: 3
    Last Post: 09-14-2005, 09:05 PM
  4. [SOLVED] My Microsoft Office Excel 2003 disappeared
    By Jen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2005, 10:05 PM
  5. Replies: 1
    Last Post: 02-27-2005, 08:06 PM

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