-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- line -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Let's look at a group of general situation:
Sub Test1 ()
A=1
MsgBox A
End Sub
What is the content of the prompt dialog box pops up? Yes, 1, yes, too simple
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- line -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Now look at the next set, we create a new PPT, in page 1, all things are deleted, and then insert a text box (system automatically think this text box Shapes (1)), just write something inside, press ALT + F11,
Sub Test2 ()
With ActivePresentation. Slides TAB (1). Shapes (1) TextFrame2. TextRange. The Font
With the Line
. ForeColor. RGB=RGB (250, 0, 0)
. Weight=1
MsgBox. ForeColor. RGB
MsgBox. Weight
End With
End With
End Sub
Then what is the content of the prompt box pop-up? Is no exception, and you want to, pop-up 250 for the first time, the second pop-up 1, and we see that the word in the text box is tracing a side,
(note: why do I want to use two with? Is to want to let you see more clearly, are used to compare, behind)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- line -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
A group, in just the PPT, insert a table (the system automatically think this text box Shapes (2)), in the first cell cell (1, 1) in the write something casually, press ALT + F11,
Sub Test3 ()
With ActivePresentation. Slides TAB (1). Shapes (2) the Table. The Cell (1, 1), Shape. TextFrame2. TextRange. The Font
With. The Fill
. ForeColor. RGB=RGB (0, 0, 0)
MsgBox. ForeColor. RGB
End With
End With
End Sub
Or normal, prompt box pop-up 0, the cell cell (1, 1) in the word black,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- line -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Start below 4 groups:
Sub Test4 ()
With ActivePresentation. Slides TAB (1). Shapes (2) the Table. The Cell (1, 1), Shape. TextFrame2. TextRange. The Font
With the Line
. ForeColor. RGB=RGB (250, 0, 0)
The Weight=6
MsgBox. ForeColor. RGB
MsgBox. Weight
End With
End With
End Sub
The pop-up prompts now is what? Pop up two uncertain number respectively, but not we just assigned 250 and 6, what the hell is this? The cell and the cell (1, 1) without any change in the word,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - the last of the line -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Was listed so many groups, is to show that the code format is no problem, there is no error, but the fourth group assignment cannot take effect, can't understand, you my seminars,
Beg explanation! Beg explanation! Beg explanation!
CodePudding user response:
Supplement: this is only for the words [form] [method] line, other testsCodePudding user response:
With statement piece don't nestedWith statement piece don't nested
Don't nested With statement block
CodePudding user response:
This have what good strange, that's because the words "in the" table doesn't support set "stroke"!!!!These "object" is equivalent to "control", which properties allow you to modify it, what properties do not allow you to modify, is it the boss...
CodePudding user response: