-
option explicit statement.
Used at the module level to force all variables in the module to be explicitly declared.
-
Declarations for standard modulesDeclarations in standard modules You have to add a module first.
Form module declarations are to be declared in the form's Generic --Declarations.
A class module is the same as a standard module, and to declare it in a class module, you have to add a class module first.
-
A new module can be declared, just like the others.
-
It's all in the head, in the module, in the form, the head of the class module is written clearly.
-
Just add the module where you added the form.
-
Click the button in the upper left corner of the standard module to select the standard module The form declaration area is the area above the form load, and you can also select the general and declaration through the two selection boxes.
Remember to adopt it.
-
The public functions in the module can be called in any form, do you have any difficulties?
-
If there is an option explicit statement at the beginning, put it underneath.
If not, it's the front of the form area.
-
General Notices section.
Double-click on the control to go to the "General Declarations Section".
-
The first y can be called in various procedures.
The second can only be used in its own process.
dim x as integer
private sub command1_click()print x
print y
end sub
private sub form_load()dim y as integer
x = 2y = 3
end sub
-
One is a global variable and one is a local variable.
-
First of all, make sure that the declaration of the function is public, that is, public, if it is private, it will not work. Then, in the form, you can use it in the following way: module name. Function name, if you hope it helps.
a = "n c hundred du q49232 ah ah ah pp"
mid(trim(a), 9, 5) 'From the 9th character from left to right (spaces are also counted), count 5 characters you want. >>>More
abs function: calculates the absolute value.
rnd function: Returns a single-precision number containing a random value. Without parameter, it is a decimal between 0 and 1. >>>More
Good question, write with a for loop and judgment statement. >>>More
Try my way:
Create a text on the form, and a command1 >>>More
With there seems to be nothing simplified at present.,This was originally Qiaosen for the sake of simplicity to write Min Pai Mu.。 The main thing is not knowing the specifics. >>>More