Brian.Crawford
Board Regular
- Joined
- Oct 3, 2007
- Messages
- 136
Excel 2007, I have a workbook that I am developing for some customers that uses VBA to do forms and other processing. It WORKS FINE on my 2 development machines (one Win7 other XP) but when I move to the users (and a 3rd machine of my own) I get the error:
"Compile error"
"Can't find project or library"
The first time the code stops it highlights on a Public Sub GetInfo() statement that is called by the Workbook_Open routine and marks (in blue) the word "LEFT" in the following line (in the called Sub):
DivisionID = Left(WorkBookName, Sep1 - 1)
I "reset" the code and go to one of the worksheets. The worksheet captures right clicks via:
Private Sub Worksheet_BeforeRightClick(ByVal target As Range, Cancel As Boolean)
Cancel = True
Call DivCCSummary(Application.ActiveSheet.Name, target)
End Sub
Inside DivCCSummary there is a call to a Function and it stops again on the "Public Function ..." statement and highlights the word "FORMAT" giving the same error on the following line
ctl.Value = Format(Worksheets(Sht).Range(rngName)(1, i), DlrFmt)
(I'm looping through controls here and setting some values)
This repeats on other VBA calls from the sheet, on other words like "Str(....)", etc. as well as on Calls via "Right Click"
As the items it hightlights are regular Excel/VBA items I don't understand what could be missing, especially given the sheet seems OK other than during the Sub/Function calls.
My development machines do have various add-ins (PUP7, RBS_Utilities ,Solver ,Lookup, Sumif,..).. These add-ins do not exist on the other machines. In My project there is a folder called "references" that has an entry "References to RBS_Utilities.xla" but I have no idea what in my code would make a reference to it, if in fact one exists. In fact I do not recall actually installing this set of utilities. None of these add-ins exist on the other machines but the "Reference" to RBS does still exist within the project its self.
If you think this is part of the problem how do I delete such references (via the Add-Ins menue ???) as I'm sure I don't (knownly) use and of the functions ( LEFT, STR, FORMAT can't possibly be part of it). This Add-in does not show in the Add-in list under "Excel Options", nor in the add-in manager.
Advice needed
Thanks all
Any
"Compile error"
"Can't find project or library"
The first time the code stops it highlights on a Public Sub GetInfo() statement that is called by the Workbook_Open routine and marks (in blue) the word "LEFT" in the following line (in the called Sub):
DivisionID = Left(WorkBookName, Sep1 - 1)
I "reset" the code and go to one of the worksheets. The worksheet captures right clicks via:
Private Sub Worksheet_BeforeRightClick(ByVal target As Range, Cancel As Boolean)
Cancel = True
Call DivCCSummary(Application.ActiveSheet.Name, target)
End Sub
Inside DivCCSummary there is a call to a Function and it stops again on the "Public Function ..." statement and highlights the word "FORMAT" giving the same error on the following line
ctl.Value = Format(Worksheets(Sht).Range(rngName)(1, i), DlrFmt)
(I'm looping through controls here and setting some values)
This repeats on other VBA calls from the sheet, on other words like "Str(....)", etc. as well as on Calls via "Right Click"
As the items it hightlights are regular Excel/VBA items I don't understand what could be missing, especially given the sheet seems OK other than during the Sub/Function calls.
My development machines do have various add-ins (PUP7, RBS_Utilities ,Solver ,Lookup, Sumif,..).. These add-ins do not exist on the other machines. In My project there is a folder called "references" that has an entry "References to RBS_Utilities.xla" but I have no idea what in my code would make a reference to it, if in fact one exists. In fact I do not recall actually installing this set of utilities. None of these add-ins exist on the other machines but the "Reference" to RBS does still exist within the project its self.
If you think this is part of the problem how do I delete such references (via the Add-Ins menue ???) as I'm sure I don't (knownly) use and of the functions ( LEFT, STR, FORMAT can't possibly be part of it). This Add-in does not show in the Add-in list under "Excel Options", nor in the add-in manager.
Advice needed
Thanks all
Any
Last edited: