Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default "Object required" error

Hi,

Why does this produce an "Object Required" error and how can I fix it?
Column A contains worksheet names. Row 5 contains text representing a cell
reference like "G16".
==================
Sub FixFormulas1()
For Each x In Worksheets("Summary1").Range("B9:C30")
If Cells(x.Row, 1) < "" Then
x.Formula = "='" & Cells(x.Row, 1).Text & "'!" & Cells(5,
c.Column).Text
Else
End If
Next x
End Sub
==================
Thanks in advance,

Damien


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default "Object required" error - FOUND THE PROBLEM

Sorry - I answered my own question. I was using the wrong variable name
"c.column", should be "x.column"
doh

"Damien McBain" wrote in message
...
Hi,

Why does this produce an "Object Required" error and how can I fix it?
Column A contains worksheet names. Row 5 contains text representing a cell
reference like "G16".
==================
Sub FixFormulas1()
For Each x In Worksheets("Summary1").Range("B9:C30")
If Cells(x.Row, 1) < "" Then
x.Formula = "='" & Cells(x.Row, 1).Text & "'!" & Cells(5,
c.Column).Text
Else
End If
Next x
End Sub
==================
Thanks in advance,

Damien



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
"Object Required" error when calling .Net DLL akash Excel Programming 4 May 2nd 07 04:45 PM
Macro to Create New Worksheet and Reference Cell in Old Worksheet As Tab Name - "Object Required" Error [email protected] Excel Discussion (Misc queries) 4 September 25th 06 01:35 PM
"Microsoft Visual Basic runtime error '424' object required". SharonG. Excel Worksheet Functions 0 July 5th 06 01:36 AM
error while compiling "OBJECT REQUIRED" nuti Excel Discussion (Misc queries) 1 January 12th 06 03:14 PM
Getting "Object Required" Error Message - Need Help !!! [email protected] Excel Programming 3 November 22nd 04 02:53 PM


All times are GMT +1. The time now is 07:20 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"