Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Object required Run-time error '424'

I am getting the above error on the line of code:
Application.ActiveCell.Offset(0, cCol).Text = ctl.Text

and I am not sure what I am doing wrong. Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Object required Run-time error '424'

Text is read-only. How about:

Sub qwerty()
Dim stl As Range, cCol As Integer
Set ctl = Range("A1")
cCol = 0
Application.ActiveCell.Offset(0, cCol).Value = ctl.Text
End Sub

--
Gary''s Student - gsnu200901


"Ayo" wrote:

I am getting the above error on the line of code:
Application.ActiveCell.Offset(0, cCol).Text = ctl.Text

and I am not sure what I am doing wrong. Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Object required Run-time error '424'

Ayo wrote:
I am getting the above error on the line of code:
* * * * *Application.ActiveCell.Offset(0, cCol).Text = ctl.Text

and I am not sure what I am doing wrong. Any ideas?


What's the value of cCol? One of the functions is returning a null
object. Try breaking it up and see which one fails:

Dim Thing As Object
Set Thing = Application
Set Thing = Application.ActiveCell
Set Thing = Application.ActiveCell.Offset(0, cCol)
Set Thing = Application.ActiveCell.Offset(0, cCol).Text
Set Thing = ctl.Text

Phil Hibbs.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Object required Run-time error '424'

Try
Application.ActiveCell.Offset(0, cCol) = ctl.Text

If this post helps click Yes
---------------
Jacob Skaria


"Ayo" wrote:

I am getting the above error on the line of code:
Application.ActiveCell.Offset(0, cCol).Text = ctl.Text

and I am not sure what I am doing wrong. Any ideas?

  #5   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Object required Run-time error '424'

Thanks.

"Gary''s Student" wrote:

Text is read-only. How about:

Sub qwerty()
Dim stl As Range, cCol As Integer
Set ctl = Range("A1")
cCol = 0
Application.ActiveCell.Offset(0, cCol).Value = ctl.Text
End Sub

--
Gary''s Student - gsnu200901


"Ayo" wrote:

I am getting the above error on the line of code:
Application.ActiveCell.Offset(0, cCol).Text = ctl.Text

and I am not sure what I am doing wrong. Any ideas?

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
Run-time error '424': Object Required Doug Excel Programming 2 May 27th 09 11:56 PM
Run-time error '424': Object Required loren.pottinger Excel Programming 7 August 29th 06 03:16 PM
Run time error '424' object required Meltad Excel Programming 8 August 10th 06 09:34 AM
Excel 2007 Beta 2 - Macro Run-time error '424' Object required jcm21 Excel Programming 0 June 16th 06 07:17 PM
Run-time error '424': Object required Phil Bewig Excel Programming 3 February 1st 04 08:38 PM


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

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

About Us

"It's about Microsoft Excel"