Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
"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
Posted to microsoft.public.excel.programming
|
|||
|
|||
"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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
"Object Required" error when calling .Net DLL | Excel Programming | |||
Macro to Create New Worksheet and Reference Cell in Old Worksheet As Tab Name - "Object Required" Error | Excel Discussion (Misc queries) | |||
"Microsoft Visual Basic runtime error '424' object required". | Excel Worksheet Functions | |||
error while compiling "OBJECT REQUIRED" | Excel Discussion (Misc queries) | |||
Getting "Object Required" Error Message - Need Help !!! | Excel Programming |