Thread: compile error?
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
leonidas[_18_] leonidas[_18_] is offline
external usenet poster
 
Posts: 1
Default compile error?


Hi,

I have the following macro in VBE, but by running it an error occurs.
It is a compile error and the problem is the range with named ranges in
it.
Does someone have a solution? Thanks in advance!

Sub RijInvoegen()

If Intersect(ActiveCell, Range("ToegestaneRijenOnderbouw",
"ToegestaneRijenSkelet", _
"ToegestaneRijenGevelDakPrefab", "ToegestaneRijenDiversen")) Is
Nothing Then
MsgBox "U kunt hier geen rij invoegen"
Else
Call InvoegenRij
End If

End Sub
------------------------------------------------------------------------
Private Sub InvoegenRij()

Application.ScreenUpdating = False
ActiveCell.Offset(1, 0).EntireRow.Insert
ActiveCell.EntireRow.Copy ActiveCell.Offset(1, 0).EntireRow

Selection.Offset(1).EntireRow.SpecialCells(xlConst ants).ClearContents

End Sub


--
leonidas
------------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
View this thread: http://www.excelforum.com/showthread...hreadid=554506