Visual Basic 6.0 Project will not "Make"

I have a solution in VB6 that has multiple projects as part of the whole. I need to build one .exe from one of the projects for an update. The issue is, when I click on the 'Make *.exe', I get a Compiler Error: Sub or Function not defined. I know all my variables and functions are defined because I have had to build this .exe in the past. I get the feeling it is a referencing issue, but I can't see where to make the change. Each code page has the Option Explicit set at the top. Any help at all would be greatly appreciated. Attached is a screenshot of the VB screen before I try to Make. The utility is set as the startup project, and all the projects are checked out of Source Safe. Screenshot of VB screen before Make.
LVL 1
Abacus ITAsked:
Who is Participating?
 
HooKooDooKuConnect With a Mentor Commented:
Let's assume you've made a mistake and actually accidently deleted a function:  Will the individual VBP files compile?  Will the application run in the IDE (if so, you might find the "missing" function that way.

If you didn't delete the function, I can tell you from experience that VB sort of losses its mind with some very large projects.  What I'm about to tell you is going to sound silly, but in years past, I've run into unexplained complier issues myself and this has fixed it.  The rearrange the source code.

If you know which project is "crashing", then open the VBP for that project in notepad and rearange the order of the files.  If you know which object (class or form) that is "crashing", rearrainge the order of the functions within the file.  YES, I have actually fixed a problem LIKE what you describe by simply shuffling the order of the functions in the original source code.
0
 
Éric MoreauSenior .Net ConsultantCommented:
have you check your reference into each project to see if you have some references marked as (missing) ?
0
 
Abacus ITAuthor Commented:
@ emorau, I did check the refereneces, and sadly, none are missing. That would be too easy.

@ HooKooDooku, I will try that and see if that makes any difference. It does seem a strange way to fix it, but if it's worked in the past, it should work now. I will let you know what I find.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Abacus ITAuthor Commented:
HooKooDooku, attached is the Function that is "creashing". The actual line that it is failing on is the:

Case "Export": Call ExportData(ssdbInfo)

I tried re-arranging the whole Sub in notepad, but that did not change the outcome of the build. Any other suggestions?
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
   ' fraSearch.Visible = False
    Select Case Button.Caption
        Case "Find":   If Not Toolbar1.Buttons.Item(5).Enabled Then Call GetManufacturerInformation
        Case "Stop":   blnCancel = True
        Case "Undo":   ssdbInfo.Columns("Status").Value = "Changed"
        Case "Delete": Call DeleteRow
        Case "Save":   Call SaveData
                       Call GetManufacturerInformation
                       Call EnableSwitch(True)
        Case "Copy":   Call CopyData
        Case "Export": Call ExportData(ssdbInfo)
     '   Case "Cancel": Call CancelFunction
        Case "Close":  Unload Me
                       
    End Select
End Sub

Open in new window

0
 
HooKooDooKuCommented:
So the first obvious question is where is "ExportData" defined?  Are you sure it is in scope.  Prove it by temporaroly commenting out the source code for ExportData() and redefine a subroutine with the same name within the form code that this crashing function is located in.
0
 
Abacus ITAuthor Commented:
The functions are defined. I believe I am having a referencing problem, because when I closed and re-opened the solution this morning and tried to Make the .exe, I got an error on a different form then I had yesterday. I will look into what reference I could possibly be missing. Again, I did check the References dialog box, and none are marked as Missing.
0
 
EDDYKTCommented:
can you run from IDE?
it will tell you what line will cause the problem
0
 
Abacus ITAuthor Commented:
The utility project runs fine from the IDE. The part that fails is when I attempt to close a form in the utility, then it takes me to that same function stating Sub or Funtion not defined, pointing to that same Call to ExportData.
0
 
EDDYKTConnect With a Mentor Commented:
if you lightlight the ExportData and right click and go to definition
Does it point to correct function?
0
 
Abacus ITAuthor Commented:
I get an error stating Identifier under cursor is not recognized.
0
 
EDDYKTConnect With a Mentor Commented:
which mean you cannot find exportdata on your current project
Does exportdata on another project you need to communicate with?

Try to press F2 and type exportdata and see where it find the exportdata function
0
 
HooKooDooKuConnect With a Mentor Commented:
So actually, the application "fails" in the IDE (i.e. this isn't just a complier problem).  The ExportData function/sub simply isn't in scope within the form/class that you displayed above.  

Can you show the source code for "ExportData" and explain where it is relative to the code you've already posted?
0
 
Abacus ITAuthor Commented:
I will do that as soon as I'm able to. Things just got busy here.
0
 
Abacus ITAuthor Commented:
I've narrowed down the problem to an old 3rd party software that was not copied over from an old directory to the new development environment. Now the trick is to get it to install on a new updated system since the old one is, well, so old.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.