Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i use Ms Excel functions like Ceiling(),Floor() etc in VB6 programming.Or any Class is to be made?
Posted
Comments
DaveAuld 18-Sep-11 11:37am    
Why don't you program them yourself in VB6? or am I missing something about why you are referencing Excel or are you just using this as an example of what you are trying to do?

1 solution

You can access Excel worksheet functions using Application.WorksheetFunction from Excel object model:

VB
Set objExcel = CreateObject("Excel.Application")
MsgBox objExcel.WorksheetFunction.Ceiling(2.5, 1)
objExcel.Quit


This is relatively slow because you need to create an Excel instance before using the functions.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900