Home > Software engineering >  VB an assignment problem
VB an assignment problem

Time:09-18

First met unable to assign the strange situation, this situation occurs only in specific attributes, for help on this, and for everybody discussion,
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 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 tests

CodePudding user response:

With statement piece don't nested
With 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:

refer to the second floor Runnerchin response:
With statement piece don't nested
With statement piece don't nested
With statement piece don't nested

Two with just let everyone see it clearly, get into one, too, with results in the parentheses has been said -- -- --
Moreover, the two layers of nested in other SUB also no problem.

CodePudding user response:

The
reference 3 floor Chen8013 response:
this have what good strange, that's because the words "in the" table does not support setting "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...

In the table object support stroke! Direct manipulation in the PPT, there is no problem, you can have a try,
If direct operation can be achieved, then, to implement the operation of the code is what?

CodePudding user response:

reference 5 floor pzxzhy reply:
Quote: refer to the third floor Chen8013 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...

In the table object support stroke! Direct manipulation in the PPT, there is no problem, you can have a try,
If direct operation can be achieved, then, to implement the operation of the code is what?

Can you put the form Settings "stroke"?

CodePudding user response:

Ok, found that might set by hand,


But at present the code that you sent to "invalid",
Haven't played with PPT, don't know what's wrong, wait a minute free look at...

CodePudding user response:

refer to 7th floor Chen8013 response:
well, found that might set by hand,


But at present the code that you sent to "invalid",
Haven't played with PPT, don't know what's wrong, wait a minute free look at...

Thank you very much! Hard work,

CodePudding user response:

No,
Can't find other "relevant" attribute, the member,

Feel PPT VBA is really just a semi-finished products...
Without this information in hand, and can't "record",

CodePudding user response:

references 9 f Chen8013 response:
no,
Can't find other "relevant" attribute, the member,

Feel PPT VBA is really just a semi-finished products...
Without this information in hand, and can't "record",

CodePudding user response:

reference 5 floor pzxzhy reply:
Quote: refer to the third floor Chen8013 response:

This have what good strange, that's because the words "in the" table doesn't support set "stroke"!!!!
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • VBA
  • Related