Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.dotnet.languages.vb
|
|||
|
|||
Problems with the excel find function in vb.net
I have copied this code from Excel VBA, to use in a VB.net application:
Dim r as Excel.Range r=Cells.Find(What:="02/01/2001 22:00:00", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False) But in VB.net, the editor doesn’t recognise de following constants: ActiveCell, xlFormulas, xlPart, xlByRows. Do you have any ideas? Thanks, Paulo Praça |
#2
Posted to microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming,microsoft.public.excel
|
|||
|
|||
Problems with the excel find function in vb.net
Imports Excel = Microsoft.Office.Interop.Excel
Sub Main() Dim r As Excel.Range r = Cells.Find( _ What:="02/01/2001 22:00:00", _ , _ <-- Can leave it blank here LookIn:=Excel.XlFindLookIn.xlFormulas, _ LookAt:=Excel.XlLookAt.xlPart, _ SearchOrder:=Excel.XlSearchOrder.xlByRows, _ SearchDirection:=Excel.XlSearchDirection.xlNext, _ MatchCase:=False, _ SearchFormat:=False) ..... More info -- "http://msdn.microsoft.com/office/understanding/vsto/default.aspx?pull=/library/en-us/odc_vsto2003_ta/html/ExcelObj.asp" HTH, arunkhemlai I have copied this code from Excel VBA, to use in a VB.net application: Dim r as Excel.Range r=Cells.Find(What:="02/01/2001 22:00:00", After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False) But in VB.net, the editor doesnt recognise de following constants: ActiveCell, xlFormulas, xlPart, xlByRows. Do you have any ideas? Thanks, Paulo Praça |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
problems with Excel 2007 'system cannot find the file specified' | Setting up and Configuration of Excel | |||
Problems with find/replace function | Excel Worksheet Functions | |||
Excel function problems | Excel Worksheet Functions | |||
Problems with Find in VBA/Excel | Excel Worksheet Functions | |||
Problems with Find and Date Fields in Excel macro | Excel Programming |