By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,286 Members | 2,422 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,286 IT Pros & Developers. It's quick & easy.

Run time error 1004 application defined or object defined error

P: 63
When I run the following macro in Excel (using VBA) I get the run time error 1004 application defined or object defined error. I get the usual debug message and when I click end I actually get the result I want from the formula - anyone know how to avoid getting the run time error?


Sub macro10()

Dim Workbook As String
Dim stDocName As String
Dim CurrMo As Range

Set CurrMo = Worksheets("GROUP RR MAIN ACC").Range("c3")
stDocName = "Q:\Cash\Bank Charges\2009\Chase Downloads\" & CurrMo & "\[grp15131683.xls]"

Worksheets("GROUP RR MAIN ACC").Activate
'ActiveCell.FormulaR1C1 = "=IF(ISERROR(VLOOKUP(RC[-2],'" & stDocName & "Activity Detail'!R7C1:R105C8,4,0))=TRUE,0,(VLOOKUP(RC[-2],'" & stDocName & "Activity Detail'!R7C1:R105C8,4,0)))"
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],'" & stDocName & "Activity Detail'!R7C1:R105C8,4,0)))"

End Sub
Feb 12 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.