473,418 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Run time error 1004 application defined or object defined error

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?

thanks!

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
Range("c7").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)))"
Macro2

End Sub
Feb 12 '09 #1
0 4693

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

Similar topics

11
by: frr | last post by:
Hi, After upgrading to 2.4 (from 2.3), I'm getting a weird syntax error: >>> import themes Traceback (most recent call last): File "<interactive input>", line 1, in ? File "themes.py", line...
2
by: dailem | last post by:
I have a bit of code tied to a command button in Access that runs a query then transfers it to a new Excel worksheet (& new file). It works fine EVERY OTHER TIME THAT I RUN IT....what the 'heck...
9
by: Adrian Dragomirescu | last post by:
Hello, I have the following problem: In my ASPX page is a button called "Import". The action of this button is to import a set of data in my database. I have to import big datasets and this...
3
by: Maverick | last post by:
I'm new to this, but I have received so much great information here, I had to join. Here is a problem am encountering with the following code in MS Access: objSht.Activate ...
0
by: Jono | last post by:
Hello, I've been getting this message when closing excel (not necessarily when closing the workbook by itself, but when closing Excel and the workbook at the same time): ...
4
by: dilau | last post by:
I have a problem. The error in subject appear when i run the macro Can u tell me why Case "CENTRALIZATOR SURVEY" Dim SHT As Object Set...
2
by: jr | last post by:
Hello everyone! I am new to this sort of postings so I'm not even sure if this is the correct place to start. Anyway, I would realy appreciate any help. I have a some VBA code that works quite...
2
by: amolbehl | last post by:
I use VB6.0 and when I execute the code I have given below, I get runtime Error 1004 - Specified value is out of range. Set oXL = CreateObject("Excel.Application") oXL.Visible = True ...
0
by: katyg | last post by:
I have recently upgraded from Excel 2000 to 2007. I have always been able to record macros to use in any workbook without an issue. No matter what I do, I can not seem to get a simple recorded...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.