View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
AndrewAK[_8_] AndrewAK[_8_] is offline
external usenet poster
 
Posts: 1
Default Searching Problem


Private Sub cmdOK_click()
The following code does exactly what is is supposed to do. It takes th
input from the Userform and inserts it into an Empty ActiveCell.

activeworkbook.sheets(\"rid sheet\").activate
range(\"a2\").select

do
if isempty(activecell) = false then

'***i think i need to test here to see if the activecell
txtdnum.value***
'***the cell is advanced here***
activecell.offset(1, 0).select

end if
loop until isempty(activecell) = true

'***if the activecell does = txtdnum.value, i don't want to insert 4
'***following vaules. at this point, if the activecell = txtdnum.value
i want
'***the code to reset the activecell back to \"a2\" and be ready fo
new data.

activecell.value = txtdnum.value
activecell.offset(0, 1) = cbodescription.value
activecell.offset(0, 2) = txtcount.value
activecell.offset(0, 3) = txtserialnum.value
range(\"a2\").select

end su

--
AndrewA
-----------------------------------------------------------------------
AndrewAK's Profile: http://www.excelforum.com/member.php...fo&userid=1554
View this thread: http://www.excelforum.com/showthread.php?threadid=27187