Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default R/T 1004 Error

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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default R/T 1004 Error

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 1004, Application-definded or object-defined error Mirco Wilhelm[_2_] Excel Programming 9 January 7th 06 04:56 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Interior class error/runtime error 1004 David Goodall Excel Programming 1 October 24th 04 10:16 PM


All times are GMT +1. The time now is 09:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"