Hello Experts
See My Code - Private sub F_Clear(Paramarray Cntr())
-
dim i%
-
For i=0 to ubound(cntr)
-
cntr(i).text = ""
-
next
-
End sub
In this procedure when I call this error is coming
Any Bugs in the code
Error is
F_Clear (TxtBox(0),TxtBox(2))
Compile Error
Expected: =
14 2313
Hello Experts
See My Code
Private sub F_Clear(Paramarray Cntr())
dim i%
For i=0 to ubound(cntr)
cntr(i).text = ""
next
End sub
F_Clear (TxtBox(0),TxtBox(2))
Compile Error
Expected: =
I dont know what the problem might be. I tried it using two textboxes, and it cleared them without any problem. May be your textboxes have some issues.
btw, i liked your avatar.
HTH
Hello Kadghar
Thanx For Reply
Hw u try
Plz Give me
textboxe have wat pblm occure, if it is one then no prob
also Give u r trying code
I will
Faisal
I dont know what the problem might be. I tried it using two textboxes, and it cleared them without any problem. May be your textboxes have some issues.
btw, i liked your avatar.
HTH
Hello Kadghar
Thanx For Reply
Hw u try
Plz Give me
textboxe have wat pblm occure, if it is one then no prob
also Give u r trying code
I will
Faisal
i created a new form with two textboxes : textbox1 and textbox2, then i copy pasted your sub, and in the click event of the form i called it: - Private Sub F_Clear(ParamArray Cntr())
-
Dim i%
-
For i = 0 To UBound(Cntr)
-
Cntr(i).Text = ""
-
Next
-
End Sub
-
-
Private Sub UserForm_Click()
-
Call F_Clear(TextBox1, TextBox2)
-
End Sub
then i run it, write something in each textbox and when i click on the form it clears both textboxes.
HTH
Hello Kadghar
Thanx For
It is wat is Usage of Using call Before Procedure
I mean
Call F_Clear(textbox1)
i just Call as
F_Clear(textbox1)
When use call Bfore that it working
Reply if u can
Faisal
i created a new form with two textboxes : textbox1 and textbox2, then i copy pasted your sub, and in the click event of the form i called it: - Private Sub F_Clear(ParamArray Cntr())
-
Dim i%
-
For i = 0 To UBound(Cntr)
-
Cntr(i).Text = ""
-
Next
-
End Sub
-
-
Private Sub UserForm_Click()
-
Call F_Clear(TextBox1, TextBox2)
-
End Sub
then i run it, write something in each textbox and when i click on the form it clears both textboxes.
HTH
Hi guy'z the only thing differ between kadghar codes and mafaisal codes is that kadghar - Call F_Clear(TextBox1, TextBox2)
mfaisal - F_Clear (TxtBox(0),TxtBox(2))
-- Kenneth
"Better Than Yesterday"
Hello
Yes I Know, When Use Call that work
My Question is Wat is the importants of Using Call...?
Faisal
Hi guy'z the only thing differ between kadghar codes and mafaisal codes is that kadghar - Call F_Clear(TextBox1, TextBox2)
mfaisal - F_Clear (TxtBox(0),TxtBox(2))
-- Kenneth
"Better Than Yesterday"
Hello
Yes I Know, When Use Call that work
My Question is Wat is the importants of Using Call...?
Faisal
I dont know. I thought it was the same using it or not.
I have that "bad habit" of using it, but... seems that it solved the problem this time.
There was a short discussion in this forum about using Call a few weeks ago, i'll see if i find it to ask why this is happening to some Expert...
Ô_o (wait... )
This might help you Importance of Call
-- Kenneth
"Better Than Yesterday"
I see... but they say you can use it for calling functions if you dont care about the return value. but... this is not a function!!!!
=( this time i have no idea why this is happening, i'll google some similar situations.
K, Thanx
So It Concluded That
Using of Call is Good Practice
Usually i did not use Call
K
Faisal
This might help you Importance of Call
-- Kenneth
"Better Than Yesterday"
K, Thanx
So It Concluded That
Using of Call is Good Practice
Usually i did not use Call
K
Faisal
Yes! it is easier to identify codes.. you should start practicing it
I've never used a ParamArray, so this might be incorrect. But my immediate response is that instead of F_Clear (TxtBox(0),TxtBox(2))
you should try F_Clear TxtBox(0), TxtBox(2)
Yes! it is easier to identify codes.. you should start practicing it
Absolute rubbish! With the possible exception of a ParamArray (don't know yet) there's no reason to use Call.
EDIT: No, I've tried it, and the ParamArray has no effect. You don't need the Call either way. Just leave off the extra parentheses.
I've never used a ParamArray, so this might be incorrect. But my immediate response is that instead of F_Clear (TxtBox(0),TxtBox(2))
you should try F_Clear TxtBox(0), TxtBox(2)
Not incorrect at all, it worked great.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Tom |
last post by:
Hi everyone
In VB6,paramarray parameter is passed using byref,but in VB.NET,using byval.How can I get back the changed value of the paramarray parameter
My work case in vb.net like this...
|
by: Cort |
last post by:
I have a project that I am trying to upgrade that uses VB6 components and ASP. I have gotten to the point when I have been able to upgrade the project to VB.NET, compile and register it for use by...
|
by: Edlueze |
last post by:
Greetings:
I have two functions and I would like to pass the ParamArray gathered
from one function to the other function. For the purposes of this post,
let's say that they are calculating...
|
by: Bruno Miousse |
last post by:
I am trying to invoke a COM component (written in VB6) which accepts
parameter of ParamArray data type.
What would be the proper syntax in C# for passing ParamArray in VB6?
Thanks.
|
by: Tubs |
last post by:
I know it might seem weird but i have a need to pass the contents of a
paramarray from one sub to another that also takes a paramarray.
Problem is i want to pass it exactly as it came in to the...
|
by: Peter |
last post by:
Hi everyone
In VB6,paramarray parameter is passed using byref,but in VB.NET,using byval.How can I get back the changed value of the paramarray parameter
My work case in vb.net like this...
|
by: djpirra |
last post by:
Hi,
I managed to create a Shared Add-in in Vs.net 2003 and create all the
menus,
UDFS and all that....
The only 2 problems i am having now are:
1 - The formulas seems to work only at second...
|
by: ADezii |
last post by:
Generally, the number of Arguments in a Procedure Call must be the same as in the Procedure Specification. If a Procedure requires 3 Arguments in its Specification, when calling the Procedure you...
|
by: mafaisal |
last post by:
End of parameter list expected. Cannot define parameters after a paramarray parameter.
Public Sub F_Bind(ByVal StrSql As String, ByVal ParamArray Ctrls() As Object,Optional ByVal Row as Integer...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |