As you highlighted in your request a text box is TEXT so you have to
perticulir in what insturction to use in getting the max value and
finding account numbers on the worksheet. I usually get a range object
for the location of the Account number like this
with Sheets"(sheet1")
LastRow = .Range("A" & rows.count).end(xlup).row
'note I assume ther is a header row
Set AccountRange = .Range("A1:A" & LastRow)
TextValue = me.combobox1.Text
NumValue = Val(texttValue)
'Get Max value of Accont numbers from worksheet
MaxVal = worksheetfunction.Max(AccountRange)
'Use this code to find an account number
'note find looks for the text value
set c = AccountRange.find(what:=textValue, _
lookin:=xlvalues,lookat:=xlwhole)
if c is nothing then
msgbox("Did not find Account : " & textVal)
else
msgbox("Found Account : " & textVal & " at cell : " & c.address)
end if
end with
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=175168
Microsoft Office Help