Link to home
Start Free TrialLog in
Avatar of TypingStars
TypingStars

asked on

Visual Basic 6 Error

My vb6 program suddenly would not load.
Keeps giving two errors.

First:   Retained=0    suddenly I have a error with this file reference in vbp loading.  checked my backups from even a year ago and my vbp files always had it.     I REMOVED IT!

Second:
MultiUse = -1    gives a error message - Compile error: Invalid outside procedure

THESE ERROR ONLY HAPPEN IF I LOAD THE PROJECT BY CLICKING THE VBP FILE.  
If I open vb6 first, then go to existing files and load its works.  Any idea what happened and how to fix short of reinstalling vb6, Thank You
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TypingStars
TypingStars

ASKER

This is exactly what I have starting from the very top, but see bottom comment:

MultiUse = -1
Persistable = 0
DataBindingBehavior = 0
DataSourceBehavior  = 0
MTSTransactionMode = 0
End
Option Explicit
__________________________________________________________________________________________
Public Function ......

Looking at a backup, Option Explicit was the top instruction. Do not know how the top section got there, so I'm commenting it out.

Retained =0 problem- when I click on the vbp file it by default is opening VB5 and was giving the Retained error.  Tried renaming DevSTudio folder and pointing vbp file to VB6, but it will not take.  Keeps loading it in Notepad even with me telling it VB6.exe for some reason.  Just going to load VB6 first to make sure I'm in the newest version.  Any last comments appreciated, Thanks
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you
including these two new ones.
Creating your own Excel Formulas and doing the impossible
A Guide to Writing Understandable and Maintainable VBA Code
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014