Thread: R/T 1004 Error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default R/T 1004 Error

Jim,

Use End(xlToLeft) rather than End(xlLeft)

HTH,
Bernie
MS Excel MVP


"Jim May" wrote in message news:Jp6rg.53984$fG3.34508@dukeread09...
I'm sure this is elementary, but I'm still at this stage.
Can someone point out my problem?

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 7/6/2006 by Jim May
'

'
Dim lcol As Integer
ActiveCell.Rows("1:1").EntireRow.Insert
ActiveCell.Offset(1, 0).Select
lcol = Cells(ActiveCell.Row, Columns.Count).End(xlLeft).Column << R/T error Here
MsgBox lcol

' Set rng = Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell, Row, 256))

End Sub