View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
kounoike[_2_] kounoike[_2_] is offline
external usenet poster
 
Posts: 126
Default Coding questions about UserForm TextBox

Hi
i intended that code to be in two lines. so, correct code from Not to Then
to be in one line.

and about (ByVal Cancel As MSForms.ReturnBoolean)
is written in Textbox event in help file(file name is FM20.CHM)
or see The enter and Exit events written in
http://msdn.microsoft.com/library/de...ormsPartII.asp

one more thing, i'm using Excel 2002.

keizi

"excelnut1954" wrote in message
ups.com...
I copied the above sub. The 1st thing I saw is that these 3 lines are
in red:
If TextBox1.Text < "" And _
Not .Range("j:j").Find(TextBox1.Text, LookIn:=xlValues,
lookat:=xlWhole,
MatchCase:=False) Is Nothing Then

I tried to run it anyway, and that's when I found out there was a
syntax error.
Is there something obvious to anyone? Maybe one of the parenthesis in
the wrong position? I'll fool around with it, but if anyone can come up
with the error, I would appreciate it.

Also, the part of the top line

(ByVal Cancel As MSForms.ReturnBoolean)

what does this mean?

I've always seen the this part in the sub name as (), with nothing
inside. However, I've noticed entries inside the () many times in code
written for other folks here. Is this some kind of documentation? Or is

there a significant meaning of this?


Thanks for reponding, kounoike.
And thanks to anyone else who can help, also.

J.O.