Lost XLQuery reference

M

Mervyn Thomas

Everytime I open a workbook it complains about a missing reference to a
macro which was originally set to run when the workbook opened. I cannot
find this macro in the VB editor for the file or where it is referenced from
in order to kill it? Any ideas?
 
J

Joel

The title of your posting was "Lost XLQuery Refference". this may not be a
macro. Go to on worksheet menu Files _ Propertenies - Contents. See if it
is a named range. If it is run this macro

Sub removename()

For Each myname In ThisWorkbook.Names
yesno = MsgBox("Remove? " & myname.Name & " Range is : " & myname,
vbYesNo)
If yesno = vbYes Then
myname.Delete
End If
Next myname

End Sub
 
M

Mervyn Thomas

Joel - it did turn out to be a macro "XLquery.XLA which I found and
restored from a backup of Office 2000, hidden away in a library folder.
When I put this in Office 2007 where it was supposed to be the workbook
opens normally and there is now a password protected module called
Project(XKQuery.XLA) in the VBA editor. Havent a clue what the password is
and do not remember anything about it - it's dated from 2001! The strange
thing is that nearly all my workbooks hail from the same parent and they all
have this unknown module in them now!! Any idea how to dissociate these
workbooks from this module?
 
Top