Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime Error 1004

Status
Not open for further replies.

mrc72

Technical User
Dec 1, 2010
3
US
I continue to receive a runtime error 1004 when I attempt to use the celing function in Access. I have created a module which looks like the following:

Public Function MyCeiling(inputval As Double, roundval As Double) As Double

MyCeiling = Excel.WorksheetFunction.Ceiling(inputval, roundval)
End Function

The Excel library 11.0 is checked and active. I get the results once, but can not export, sum the data, or run it again without removing the module and starting over.

Does anyone have any clues as to how to fix this?
 
MyCeiling = CreateObject("Excel.Application").WorksheetFunction.Ceiling(inputval, roundval)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PH - Thanks for the quick post. It appears to be working, but it is going slowly. I have over 500k lines and each one is taking 2 - 3 seconds to load and calculate. Any easy way around that?

MRC
 
I also just received a "Run-time error 429 - ActiveX component cant create object" error and the calculation ended with no actual results. Thanks for the attempt PH.
 
Well, don't use excel just for a function !
Have a look here:
faq705-5031

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top