View Full Version : Solved: Application.WorksheetFunction.CountIf not support in OutLook
Emily
03-09-2006, 08:54 AM
The code works in Excel
Application.WorksheetFunction.CountIf(Range(Cells(i, 11), Cells(i, LastRow)), 0)
It does not work in OutLook Excel.Application, why?
Sorry, Please discard this question
It needs Excel.Application :banghead:
Emily
Jacob Hilderbrand
03-09-2006, 09:03 AM
Application in this case would be the Outlook Application. What did you call the Excel Application?
i.e.,
Dim AppExcel As New Excel Application
AppExcel.WorksheetFunction.CountIf...
Also you will need to be more specific with the range. Do you have an Excel Spreadsheet Object?
i.e.
Dim Wkb As Excel.Workbook
Set Wkb = AppExcel.Workbooks.Add 'Or Open
Then Use
Wkb.Sheets(1).Range...
Emily
03-09-2006, 09:06 AM
DRJ, thanks for your quick response
I found it was my mistake, it needs Excel.Application
Excel.Application.WorksheetFunction.CountIf
Jacob Hilderbrand
03-09-2006, 09:09 AM
Glad you got it working. :beerchug:
Take Care
Emily
03-09-2006, 09:49 AM
DRJ
There is no "Solved" in Thread Tools
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.