Share via

Userform not found

Anonymous
2024-10-22T13:44:00+00:00

FILE: Grading Workbook

In the above workbook on Worksheets("Students"), I have a command button captioned "STUDENT GRADES." I have been editing this workbook from its original state to accommodate a course that is structured differently. The basics remained but I deleted a lot of stuff.

That said, I was working on the userform associated with the above-mentioned command button. I had deleted various labels, textboxes, etc. from the original userform to adapt it to the course it will be used in. All of a sudden, I get the following error, and I do not know how to correct it or what happened.

Can you please advise and correct?

Thank you,

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Rory Archibald 18,965 Reputation points Volunteer Moderator
2024-10-22T14:24:00+00:00

Your grades routine refers to Textbox35 and higher but they do not exist on your form.

By the way, a lot of your declarations are wrong. If you write:

Dim rng1, rng2 as Range

only rng2 is declared as a Range object; rng1 is a Variant. You have to specify the type for each variable individually.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2024-10-23T18:39:07+00:00

    Thanks! I also did not realize that have multiple variables in the DIM line would not apply to all variables in that DIM.

    Was this answer helpful?

    0 comments No comments