I am using all objects however I am using this statement to locate cells and its the only reason I have the excel reference.
VB Code:
'Finds the location of a cell that contains the string provide. 'If found returns the cell number location if not found returns -1 Private Function FindCellLocation(Sheet As Object, Look As String) As Integer Dim nCol As Integer For nCol = 1 To Sheet.Cells.SpecialCells(xlCellTypeLastCell).Column If Sheet.Cells(4, nCol).Value = Look Then FindCellLocation = nCol Exit For End If FindCellLocation = -1 Next nCol End Function
Is there any way to preform this section without the reference? If not then I know this program works on the platform it was designed to run on. So I could technically keep the reference. In that case how would I add the execl reference? Or is that not needed if the current version of excel works with the program its running on.
And how do you add the other dependanciess?




Reply With Quote