© Merry L. Morris

Different macros, same result.


'Macro © Martin Selditch
Sub Main
        dim CS as object
        set CS = CreateObject("Connex.Client")
        Dim x1 as Integer
        Dim y1 as Integer
        Dim x2 as Integer
        Dim y2 as Integer
        y1 = CS.CursorPosition - 2
        x1 = CS.CursorRow
        CS.EndCell
        y2 = CS.CursorPosition
        x2 = CS.CursorRow
        CS.Cut x1,y1,x2,y2
        CS.AddField 2, "50580"
        CS.CursorPosition = 12
        CS.Paste
End Sub

'Macro © Merry Morris
Sub Main
        dim CS as object
        set CS = CreateObject("Connex.Client")
        CS.CutSelected
        CS.AddField 2, "50580"
        CS.CursorPosition=12
        CS.Paste
End Sub

Before either macro runs: place cursor where you want to split the field (and highlight to the end of the field before running shorter macro)


After either macro runs: