+ Reply to Thread
Results 1 to 2 of 2

VBA, Excel run-time error '381' and now a Compile Error

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

    VBA, Excel run-time error '381' and now a Compile Error

    I am just going to start over with a new thread because these two questions have combined.

    I had this problem once before within this Excel Workbook. The workbook has two forms. One is a frmPrintCand which allows the user to print the candidates information onto what looks like a form within the excel worksheet. The other is a multipage userform. The first time I had this problem it was on the IntvwWorksheet Multipage Userform. Now, it seems I am having this problem on the frmPrintCand userform.

    The reason for the problem is when I only have one candidate entered, rather than more than 1.

    The first time this problem occured, it was the following code:

    Please Login or Register  to view this content.
    and the solution was the following code:

    Please Login or Register  to view this content.
    It seemed to have worked. I didn't have another problem until yesterday, though it's not often I only have one candidate. So, this time it is the following code:

    Please Login or Register  to view this content.
    and, I tried the following code by adjusting the code previously provided to fit this one. It didn't work, I'm given a Compile error: Variable not defined, and it highlights the varCand =.

    Please Login or Register  to view this content.
    I don't even know if this is the correct solution. If not, then how should I go about it. If so, how do I fix this Compile Error?

    Here is the file for review:

    ComboBoxPrintBox_TroublesV10.xlsm

    Thank you!

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

    Re: VBA, Excel run-time error '381' and now a Compile Error

    It's been figured out. Yay!

    The changes in red were necessary:
    Please Login or Register  to view this content.

+ 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