'TITLE: ADD TABLE OWNER GLOBALLY 'DESCRIPTION: For physical models, this will update the owner field ' in the table editor for all tables in the active model. The ' active model must be a physical model. Sub Main Dim diag As Diagram Dim mdl As Model Dim ent As Entity Dim so As SelectedObject Set diag = DiagramManager.ActiveDiagram Set mdl = diag.ActiveModel If mdl.Logical = False Then Begin Dialog UserDialog 340,147,"Set Owner For all Tables" ' %GRID:10,7,1,1 TextBox 120,42,150,21,.Owner Text 50,49,50,14,"Owner:",.Text1 OKButton 80,98,90,21 CancelButton 210,98,90,21 End Dialog Dim dlg As UserDialog If Dialog(dlg) = -1 Then 'loop through selected objects For Each ent In mdl.Entities 'update table owner from dialog input ent.Owner = dlg.Owner Next End If Else MsgBox("Active model must be a physical model.",vbOkOnly,"ERROR!") End If End Sub