-
[2005] Code Problems
Visual basic does not recognize xlFormulas, xlPart, xlByRows, and xlNext in the following code, I get squiggly lines saying that they are not declared. Can anybody Help with this?
Code:
objExl.Cells.Find(What:="Survey Type", After:=objExl.ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate()
-
Re: [2005] Code Problems
Thats because they are not defined constants in NET as they are VBA constants. Since they are not fully qualified with the complete .NET object heirarchy. Search the object browser for the constants and then copy the class heirarchy to it and viola!
-
Re: [2005] Code Problems
search the object browser in excel, or VB
-
Re: [2005] Code Problems
In VB. If you are using a reference in VB of Excel then it will definately show up in the object browser search. In Excel it will just show the const value as its not .NET but rather VBA.