theTable = av.GetActiveDoc theVTab = theTable.GetVTab numrecs = theVTab.GetNumRecords theVTab.SetEditable(true) fieldList = theVTab.GetFields.Clone shpFld = theVTab.FindField("Shape") fieldList.RemoveObj(shpFld) oldFld = MsgBox.ChoiceAsString(fieldList,"Select field to rename", "Choose field") newName = MsgBox.Input("Type new field name","New Name",oldFld.AsString) newFld = Field.Make(newName,oldFld.GetType,oldFld.GetWidth,oldFld.GetPrecision) theVTab.AddFields({newFld}) av.ShowMsg("Renaming field") av.ShowStopButton for each rec in theVTab theVTab.SetValue(newFld,rec,theVTab.ReturnValue(oldFld,rec)) av.SetStatus(100*(rec+1)/numrecs) end av.ClearMsg theVTab.RemoveFields({oldFld}) theVTab.SetEditable(false)