Blind cat hits dead mouse 1: module-level object variable without new and the single parameter process that must be called

Source: Internet
Author: User
Technorati Tag: module-level object variable, single-parameter process, call, new, VBA

Today, I have made two calls.

The first is about object variables.Module-level object variablesThere is no new when declaring, and new is in form open. After the process comes out, this object variable does not exist. No, since I declared that it is a module-level memory, it should always exist. Although I applied for the memory in the process, it has been referenced by the module-level variables, how can I leave school when the process ends? Not clear. You have to change itIn the Declaration, new.

Private mobjatree1 as new annatree 'treeview6

The second is about process calling. The process with two or more parameters is calledMust use callBut only one parameter can be called without calling. But today IOnly one parameter method of the called objectNo call is required. The error message is: runtime error 438: the object does not support this attribute or method. The Error Reporting Mechanism of VBA is really depressing. if you guess where the error is wrong, you should vomit blood. I didn't vomit blood because I drank a little wine and pressed it. I checked the object method declaration, the object parameter declaration passed to this method, and added monitoring. No problem. I can't comment out all the internal methods ...... Rao is dizzy. I don't know what to do with it. I added a call and it became. % ¥ & × * $ % & * $ % ^ &*

Call mobjatree2.copynodefromothertree (mobjatree1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.