Is there anyway to do that? I'm making a wrapper for some functions and want to keep it compatible with the original, so i need a Sub Close in my class.
Printable View
Is there anyway to do that? I'm making a wrapper for some functions and want to keep it compatible with the original, so i need a Sub Close in my class.
I think this is not possible in VB6.
It is possible in VB7. Because Functiona overloading is introduced in it.
Am I correct?
Yeah like i have time to wait for VB7.
And i couldn't find it so i posted here to see if someone knew the awnser, not to tell me that it can not be done(already know that it can't be done but maybe someone knows a trick)(No offence).
the closest that you'll get is by appending a letter to the end of the name:
Call SplitA("blah blah")
where the restricted keyword would be Split()
I cant wait until the new error handling stuff comes out in VB7, sounds very cool
Hi
I'm not 100% sure on this, but I think that you can enclose the restricted word in square brackets [close] to overcome this. I,m far from being a VB expert, perhaps one of the many experienced players on this forum can confirm this/or not as the case may be.
Sorry I can't help you any further
GRAHAM ;)
Well you shouldn't really call it close anyway, it'll confuse you If you need to use the Close Keyword. Callit Something else CloseApp or something.
I think the problem is the other way round:
if you make (eg) as split function you cannot use the VB
split function. Square brackets work, but appending a
letter to the function name would be better, I think.
The [Close] doesn't seem to work.
I tried Private Sub [Close] but it still gives me the same error(also tried this with other keywords, same error).
And i know it would be better to call it CloseA or something but i need it to be called Close. I'm trieing to create a wrapper and i want it to be compatible with the original. And i really think that useing close won't be much of a problem because the sub goes in a class so it will be, Class.Close.
For example look at the Recordset(DAO/ADO/RDO?) they all got Recordset.Close so i want that to.
I also tried to Implement the object i need to make it compatible with but i get the following error.Quote:
Bad interface for Implements: Interface is derived from another pure interface with non-restricted methods