Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-17-2022, 05:11 AM
ericliu24 ericliu24 is offline compile error : can't find project or library Windows 10 compile error : can't find project or library Office 2016
Novice
compile error : can't find project or library
 
Join Date: Mar 2022
Location: China
Posts: 21
ericliu24 is on a distinguished road
Default compile error : can't find project or library

When openning the template dotm file on another machine , my VBA code throw compile error : can't find project or library, and debugger indicates error on funtions like trim, ltrime or symbol chr(32).



The code works perfectly on my development machine, and the Word versions are the same (2016), and references are also the same.

How could I solve it ? Many thanks.
Reply With Quote
  #2  
Old 04-17-2022, 05:39 AM
macropod's Avatar
macropod macropod is offline compile error : can't find project or library Windows 10 compile error : can't find project or library Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Have you tried repairing the Office installation (via Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change > Repair)?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-17-2022, 06:18 AM
ericliu24 ericliu24 is offline compile error : can't find project or library Windows 10 compile error : can't find project or library Office 2016
Novice
compile error : can't find project or library
 
Join Date: Mar 2022
Location: China
Posts: 21
ericliu24 is on a distinguished road
Default

I did it as you suggested, the problem is still there.

The problem seems isolated on this dotm file, as I created a new file with some simple code with ltrim etc. , it works.

I noticed that when openning the dotm file, the tools-Refenrences is disabled, so I can't see or click the libraries.

How to enable the Refenrences?
Reply With Quote
  #4  
Old 04-17-2022, 06:47 AM
ericliu24 ericliu24 is offline compile error : can't find project or library Windows 10 compile error : can't find project or library Office 2016
Novice
compile error : can't find project or library
 
Join Date: Mar 2022
Location: China
Posts: 21
ericliu24 is on a distinguished road
Default

Problem solved.
The original dotm file has a library from acrobat (I don't know how is that), and another machine doesn't have this library, showing missing status.

I unclick this library from the original dotm file. It's fixed .
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message ["Project is unviewable"] when I try to exit Word; despite my running Debug, Compile [ marceepoo Word VBA 2 05-07-2020 03:48 PM
compile error expected end sub ashg75 Word VBA 2 07-13-2017 07:08 AM
compile error : can't find project or library Compile error in Module ksigcajun Word VBA 2 04-08-2015 06:44 AM
Compile error: sub or function not defined.. xena2305 Excel Programming 0 08-02-2011 10:17 AM
compile error in Word raco Word 0 09-28-2010 12:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft