+ Reply to Thread
Page 8 of 8 FirstFirst ... 6 7 8
Results 106 to 117 of 117

Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

  1. #106
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    Oh, Ok. Will do. Thanks. I will proceed with working on this. After you have a look at the attachment, please let me know what changes you make so I can transfer them to my working document

  2. #107
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    Hmmm, I have added my If Then Statements to the "Add/Update" button and I am getting a "Compile Error: Expected End With" and then it hightlights the 'Private Sub AddUpdateCand_CommandButton_Click()'

    Please Login or Register  to view this content.

  3. #108
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    18,926

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    That code compiles OK.
    If posting code please use code tags, see here.

  4. #109
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    Hmmm, then maybe it has to do with where I put it. Here's the code in it's entirety:

    Please Login or Register  to view this content.

  5. #110
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    18,926

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    Count the Withs and End Withs.

    By the way, I don't think that the code to add the job data should be part of the code to add a candidate.

    The job data doesn't change per candidate, it's always the same.

    What you really need is a button on one of the pages where you enter the job data.

    That button will save the data to the relevant worksheet.

    Actually, that brings something up.

    Are you going to be using this for more than one job?

  6. #111
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    I counted the With's and that worked. And, my If Then Statements are working. Yay!

    The reason I added the code to add the job data when the candidate's are updated was because I didn't see another way to have that information added to JobIntvwData without having yet another button for the user to press. So, I figured when a user enters the job data and then a candidate it would update. Though, I admit that's not the best way. I probably should just create a seperate button on Tab 1 and 2 for that information to update. But, I won't want the UserForm to close. Anyway to code it so the Userform doesn't close upon clicking the button?

    No, I will NOT be using this for more than one job at a time.

    How is the other parts coming along? I know my concern was when the user adds a candidate with a similar name to a previously entered candidate, it automatically populates the rest of Tab 2 with that other candidate's data without reverting to a clear form when the user continues to add a name different from that similar name. So, if there is a Joseph Taylor already in the list and I type Joseph Smith, the moment I start typing Joseph, the data for Joseph Taylor comes up and it doesn't go away as I continue to type the last name of Smith.

    Also, when a user is entering a new candidate to the list, they will want a completley cleared form always. I think there should be a button for 'clear' so the user can do this at any time they need to. Don't you?

    Thank you for your help!! Almost finished

  7. #112
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    Oh, and we were still working on the INterview Team thing. Where we want the candidate to be able to make changes as needed on the Candidate page, but the interview team on Tab 2 be the primary unless those changes are made.

  8. #113
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    Well, I have been testing the userform and such and making necessary corrections. Now, just suddently, after having opened the UserForm by clicking the button on the excel worksheet before with no problems, it wants to give me an error. For some reason it doesn't like the following:

    Please Login or Register  to view this content.
    The funny thing is I was going to ask about this later as the form doesn't even open upon opening the excel worksheet anyway. But, it wasn't a priority. Now it has become one since it won't allow me to open my form without the following error: Runt-Timer Error '381': Could not set the List property. Invalid property array index.

    What happened?

  9. #114
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    18,926

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    There's an error somwhere in the userform code, probably in the Initialize event.

    Goto Tools>Options and on the General tab pick either Break on All Errors or Break in Class Modules.

    Once you've done that click the button.

    You'll still get an error but this time it should highlight the problem line and allow you to Debug.

  10. #115
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    Ok. I choose All Errors and it took me to the following code - pointing to the cboCandidate.list..... row.

    Please Login or Register  to view this content.

  11. #116
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    I'm fairly certain I didn't do anything while making my updates, but maybe I did... but, I don't think so.

  12. #117
    Forum Contributor
    Join Date
    10-25-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    292

    Re: Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm

    I hate to keep bothering you. We are just so close to being finished. I can feel it and I'm so excited to get this working. In addition to this new problem, have you had a chance to look at the attachment previously provided to determine the problem with entering names that are similar, how to prevent the form from closing when the user clicks 'Add/Update', and how to set up the interview team correctly?

    When I create the button to enter the Job Information and Interview and Team Informatoin onto the spreadsheet where it will be stored, should I create a button for both tab 1 and tab 2, or just on one? I'm not sure the best way to handle.

+ Reply to Thread
Page 8 of 8 FirstFirst ... 6 7 8

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