View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Casey[_19_] Casey[_19_] is offline
external usenet poster
 
Posts: 1
Default Error:Can't find project or library


Hi,
I recently copied code out of one VBA project and pasted it into a new
project. The code still works fine in the original project, but in the
new project I get the Compile Error:Can't find project or library.
VBA help says this is due to a missing reference and direct me to
"Display the References dialog box", but I can't locate this dialog box
anywhere. Here is my code and the editor highlights "msg =" in the
code. Any help would be greatly appreciated.

Sub DeleteBlankLastRow_CheckIfBlank()
Dim Response As Integer
Dim rngEntryBottomRow As Range

On Error GoTo ws_exit
Application.EnableEvents = False
Application.ScreenUpdating = False
ActiveSheet.Unprotect ("geekk")
Set rngEntryBottomRow = Range("Below_Entry_Bottom_Row").Offset(-1)

'if last detail row is blank, delete one detail row and If not
empty
' then msg box to explain error and exit sub.
If Application.WorksheetFunction.CountA(rngEntryBotto mRow) 5
Then
Msg = MsgBox("You are attempting to Delete a Row that contains
User Input. Delete Row Failed", vbOKOnly + vbCritical, "Can Not Delete
Row with Information")
If Response = 1 Or 2 Then Exit Sub

End If

If Application.WorksheetFunction.CountA(rngEntryBotto mRow) = 5
Then
With rngEntryBottomRow 'rngI
..EntireRow.Delete
End With
End If

ActiveSheet.Protect ("geekk"), DrawingObjects:=True,
Contents:=True, Scenarios:=True
Application.ScreenUpdating = True
ws_exit:
Application.EnableEvents = True

End Sub


--
Casey


------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=395380