
*
Private Sub TextUO_Change()
Dim UO As Variant
ActiveDocument.Tables(1).Cell(2, 1).Select
UO = Selection
UO = TextUO.Text
TextUO.Text = UO
Selection.Delete
Selection.InsertAfter UO
TextUO.Text = UO <- non riporta il testo inserito con Selection.InsertAfter UO
End Sub
**
Private Sub Esci_Click()
ActiveDocument.ActiveWindow.View.FullScreen = False
ActiveDocument.AttachedTemplate.Save
Application.Quit SaveChanges:=wdSaveChanges
End Sub
|
textuo = activedocument.tables(1).cell(2,1).range.text posta nell'evento Initialize del form dovresti ritrovarti caricato il valore attuale della cella di tabella specificata nella textbox chiamata "textuo".Private Sub UserForm_Initialize() TextUO = ActiveDocument.Tables(1).Cell(2,1).Range.Text End Sub |
Private Sub UserForm_QueryClose(cancel As Integer, Closemode As Integer) If Closemode = 0 Then cancel = True End Sub |
With ActiveDocument.Tables(1).Cell(2,1).Range .delete .InsertAfter TextUO End With. |
