Search code examples
excelms-accessvb6vba

Compile error can't find project or library


I'm not familiar with VB6 , I would like to compile an existing project in a new environment (which mean new desktop) , so do I missed some development tools or references to run the code below ? Because when I running the project it pointed to (Date) .

ExcelSheet.Cells(2, 1).Value = "Printed As At " & ls_now
If optCurrent.Value = True Then
    ExcelSheet.Cells(4, 1).Value = "Year : " & Year(Date)
Else
    ExcelSheet.Cells(4, 1).Value = "Year : " & cboYear.Text
End If

Please Help , thousand thanks


Solution

  • This is usually a side effect of a missing project reference. Hit the Project->References menu:

    VB6 Project References

    Look for anything that is marked as 'MISSING'. Those are the things that need to be installed/registered on your development machine. Once you do so, you'll have to restart VB to reload your project.