Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Using User-defined Types Within Procedures

This is a beginner's question but in a small database application when I click on a command button the code gives me the error message "Invalid Inside procedure" and highlights the Type statement. The Type statement and the four lines of code including the End Type line seem fine matching book and Microsoft help file examples. Any ideas?

The problem is the placement of the Type declaration. All Type declarations need to be in the declarations section of the form or the code module. They can't be defined within a procedure, as you apparently have done. Once you move the type declaration, there won't be any real change to your code, but it will work fine. Eric

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date