Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 177467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:03:35+00:00 2026-05-11T14:03:35+00:00

I have recently edited a fellow student’s data collection software to my specifications. The

  • 0

I have recently edited a fellow student’s data collection software to my specifications. The program works fine when I run within Visual Basic 6, however ideally I would like to compile the program into an .exe file so I can run it from any PC. However, when I select the option to turn it into an exe, I get the following error while its compiling:

Compile Error: Sub or Function not defined.

I was curious why my program will run from within Visual Basic, but can’t compile into an exe. Any fixes/suggestions would be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:03:35+00:00Added an answer on May 11, 2026 at 2:03 pm

    at the begining of every file, write ‘option explicit‘. This changes vb behavior from weak typed to strong typed.

    What this means is that when you put a string into an integer, then the vb will tell you right away, or at least when you press ‘run’. In a weak typed mode, the program will run until it encounters a fault, like ‘Sub or Function not defined’ then crash.

    When you compile into an ‘exe’, vb needs to do extra sanity checks much like ‘option explicit’ would do. This is why you don’t see the problem while normal execution. It is still there, lurking, but you probably don’t execute the problematic line.

    It is very important that you use this keyword in every vb source file you have, otherwise you’ll see problems like this all the time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently been working on an ACORD P&C compliant web service and have run
I have recently noticed that inside the collection objects contained in System.Collections.Concurrent namespace it
I'm trying to get away from using Mamp, so have recently installed mysql, edited
I have recently launched a site built on word press using a heavily edited
I have recently merged together 5 of my stand-alone projects into one project to
I have recently had a linux server compromised from bots uploading .php scripts and
I have recently been working on implementing an ajax based file uploader for my
I have recently coded my button to be aligned to the right of the
I have recently upgraded my MVC 3 project to MVC 4. After all the
I have recently read topics about memory fragmentation: How to solve Memory Fragmentation and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.