Link to home
Start Free TrialLog in
Avatar of Abacus IT
Abacus ITFlag for United States of America

asked on

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. User generated image
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

have you check your reference into each project to see if you have some references marked as (missing) ?
ASKER CERTIFIED SOLUTION
Avatar of HooKooDooKu
HooKooDooKu

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 Abacus IT

ASKER

@ 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.
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

Avatar of HooKooDooKu
HooKooDooKu

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.
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.
can you run from IDE?
it will tell you what line will cause the problem
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.
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
I get an error stating Identifier under cursor is not recognized.
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
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
I will do that as soon as I'm able to. Things just got busy here.
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.