|
-
Jun 9th, 2006, 09:29 AM
#2
Hyperactive Member
Re: VB6 code Help
Declare all variables with proper types, do not leave them undeclared. Leaving them undeclared flags VB to declare all undeclared vars as variants, killing your memory and slowing down the code execution. This might be the source of your problem also. if OBUF is an array of integers, you will not be able to set an element of this array to "**" since ** is a string value. Once your types are fixed, just use OBUF(1) = "**" etc.
P.S. To enable "undeclared variable check" in VB click on Tools > Options and under Editor tab check Require Variable Declaration. Doing so will automatically add option explicit to the top of every form/module, etc created so all undeclared vars will throw an error upon compilation.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|