ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Strange error message (https://www.excelbanter.com/excel-programming/297759-strange-error-message.html)

Jeroen Kluytmans

Strange error message
 
Hello,

I programmed a Macro in VB. Then I recieved another computer (I even
think the software was unchanged, versions etc.) but now I get an
error message withe the code below

If Sheets("Main").Range("$H$29") = False Then
Response = MsgBox("You did not select a batch" & Chr(10) &
"Please select one or more batches", vbExclamation, "Warning")
Exit Sub
End If

I recieve the message Compile Error: Can't find object or library.

It seems that the error is caused by the Chr(10), but removing that
does not help.

In other Macro's I also use message boxes and Chr(10) returns, there
it does not invoke a problem. It seems to be quite random. Anyone got
a clue?

Kind regards,
Jeroen Kluytmans

Rob van Gelder[_4_]

Strange error message
 
These are the symptoms for missing References.
From VB Editor | Tools | References


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Jeroen Kluytmans" wrote in message
om...
Hello,

I programmed a Macro in VB. Then I recieved another computer (I even
think the software was unchanged, versions etc.) but now I get an
error message withe the code below

If Sheets("Main").Range("$H$29") = False Then
Response = MsgBox("You did not select a batch" & Chr(10) &
"Please select one or more batches", vbExclamation, "Warning")
Exit Sub
End If

I recieve the message Compile Error: Can't find object or library.

It seems that the error is caused by the Chr(10), but removing that
does not help.

In other Macro's I also use message boxes and Chr(10) returns, there
it does not invoke a problem. It seems to be quite random. Anyone got
a clue?

Kind regards,
Jeroen Kluytmans




Jeroen Kluytmans

Strange error message
 
Rob van Gelder - http://www.vangelder.co.nz/excel wrote :
These are the symptoms for missing References.
From VB Editor | Tools | References


Any idea which reference is needed? There are almost 50 references not
checked, should I check them all?

Jeroen Kluytmans

Chip Pearson

Strange error message
 
Jeroen,

No, you definitely should not check all the references. Look in
the list and see if any of the check ones are marked MISSING. If
you find such a reference, uncheck it.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Jeroen Kluytmans" wrote in message
om...
Rob van Gelder - http://www.vangelder.co.nz/excel wrote :
These are the symptoms for missing References.
From VB Editor | Tools | References


Any idea which reference is needed? There are almost 50

references not
checked, should I check them all?

Jeroen Kluytmans




Jeroen Kluytmans

Strange error message
 
"Chip Pearson" wrote

Jeroen,

No, you definitely should not check all the references. Look in
the list and see if any of the check ones are marked MISSING. If
you find such a reference, uncheck it.


Yep, there was one missing, this solved the problem


Thanks
Jeroen


All times are GMT +1. The time now is 01:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com