Cut & Paste Excel Macro (SC Version)

    Sub Send_rows()

    AppActivate "Oracle Applications"                ' Activate Oracle Applications

    DoEvents                                         ' Passes control to operating system until all
                                                     ' events in queue have been processed

    For Each c In Selection                          ' For all cells selected

        Select Case c.Value
            Case "TAB"
                Sep = "{TAB}"                        ' Tab
                Content = ""
            Case "ENT"
                Sep = "{ENTER}"                      ' Enter
                Content = ""
            Case "*UP"
                Sep = "{UP}"                         ' Up Arrow
                Content = ""
            Case "*DN"
                Sep = "{DOWN}"                       ' Down Arrow
                Content = ""
            Case "*LT"
                Sep = "{LEFT}"                       ' Left Arrow
                Content = ""
            Case "*RT"
                Sep = "{RIGHT}"                      ' Right Arrow
                Content = ""
            Case "*FE"
                Sep = "%EE"                          ' Field Editor
                Content = ""
            Case "*SP"
                Sep = "%AA"                          ' Save and Proceed
                Content = ""
            Case "*NB"
                Sep = "%GB"                          ' Next Block
                Content = ""
            Case "*PB"
                Sep = "%GV"                          ' Previous Block
                Content = ""
            Case "*NF"
                Sep = "%GN"                          ' Next Field
                Content = ""
            Case "*PF"
                Sep = "%GP"                          ' Previous Field
                Content = ""
            Case "*NR"
                Sep = "%GR"                          ' Next Record
                Content = ""
            Case "*PR"
                Sep = "%GE"                          ' Previous Record
                Content = ""
            Case "*FR"
                Sep = "%GF"                          ' First Record
                Content = ""
            Case "*LR"
                Sep = "%GL"                          ' Last Record
                Content = ""
            Case "*ER"
                Sep = "%ER"                          ' Erase Record
                Content = ""
            Case "*DR"
                Sep = "%ED"                          ' Delete Record
                Content = ""
            Case "*AA"
                Sep = "%A"                           ' Alt + A
                Content = ""
            Case "*AB"
                Sep = "%B"                           ' Alt + B
                Content = ""
            Case "*AC"
                Sep = "%C"                           ' Alt + C
                Content = ""
            Case "*AD"
                Sep = "%D"                           ' Alt + D
                Content = ""
            Case "*AE"
                Sep = "%E"                           ' Alt + E
                Content = ""
            Case "*AF"
                Sep = "%F"                           ' Alt + F
                Content = ""
            Case "*AG"
                Sep = "%G"                           ' Alt + G
                Content = ""
            Case "*AH"
                Sep = "%H"                           ' Alt + H
                Content = ""
            Case "*AI"
                Sep = "%I"                           ' Alt + I
                Content = ""
            Case "*AJ"
                Sep = "%J"                           ' Alt + J
                Content = ""
            Case "*AK"
                Sep = "%K"                           ' Alt + K
                Content = ""
            Case "*AL"
                Sep = "%L"                           ' Alt + L
                Content = ""
            Case "*AM"
                Sep = "%M"                           ' Alt + M
                Content = ""
            Case "*AN"
                Sep = "%N"                           ' Alt + N
                Content = ""
            Case "*AO"
                Sep = "%O"                           ' Alt + O
                Content = ""
            Case "*AP"
                Sep = "%P"                           ' Alt + P
                Content = ""
            Case "*AQ"
                Sep = "%Q"                           ' Alt + Q
                Content = ""
            Case "*AR"
                Sep = "%R"                           ' Alt + R
                Content = ""
            Case "*AS"
                Sep = "%S"                           ' Alt + S
                Content = ""
            Case "*AT"
                Sep = "%T"                           ' Alt + T
                Content = ""
            Case "*AU"
                Sep = "%U"                           ' Alt + U
                Content = ""
            Case "*AV"
                Sep = "%V"                           ' Alt + V
                Content = ""
            Case "*AW"
                Sep = "%W"                           ' Alt + W
                Content = ""
            Case "*AX"
                Sep = "%X"                           ' Alt + X
                Content = ""
            Case "*AY"
                Sep = "%Y"                           ' Alt + Y
                Content = ""
            Case "*AZ"
                Sep = "%Z"                           ' Alt + Z
                Content = ""
            Case Else
                Sep = ""                             ' Move to next value
                Content = c.Value
        End Select

        SendKeys Content & Sep, True                 ' Send to Oracle Applications, wait for processing

    DoEvents                                         ' Passes control to operating system until all
                                                     ' events in queue have been processed

' Pause the macro to allow time for save and refresh screen

        Dim PauseTime, Start, Finish
        If c.Value = "*SP" Then
            PauseTime = 2                            ' Set duration.
            Start = Timer                            ' Set start time.
            Do While Timer < Start + PauseTime
                DoEvents                             ' Wait
            Loop
                Finish = Timer                       ' Set end time.
        End If

        Next

        End Sub

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Application
Oracle Application Hints and Tips

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.