Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Had missed this gotcha - until now!!
Thanks, Jim "Bernie Deitrick" <deitbe @ consumer dot org wrote in message : 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error 1004, Application-definded or object-defined error | Excel Programming | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Interior class error/runtime error 1004 | Excel Programming |