• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to convert a macro to Applescript ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to convert a macro to Applescript ?


  • Subject: Re: How to convert a macro to Applescript ?
  • From: Raymond P Reedy <email@hidden>
  • Date: Sat, 26 Jul 2014 18:25:24 -0400

I have a VBA macro that I need to convert to AppleScript. Any help that is provided will be greatly appreciated.

Here is the text …

Sub DeleteRowIfNoScore()
'
' DeleteRow Macro
' Macro recorded 4/29/2007 by Raymond P Reedy
'
Sheets("Sorter").Select
    Dim oCell As Range
    Dim i As Integer
    Dim rng As Range
    Set rng = Range("C2:C300")
    rng.Select
    rng.Range("A1").Activate
    '  For Each oCell In rng
    '  If IsEmpty(oCell) Then
    '       oCell.EntireRow.Select
    '       Selection.Delete Shift:=xlUp
    '   End If
    ' Next
    
    For i = 2 To Selection.Count
      ' MsgBox i
      Set oCell = ActiveSheet.Rows(i).Cells(3)
      If IsEmpty(ActiveSheet.Rows(i).Cells(1)) Then
        Exit Sub
      ElseIf IsEmpty(oCell) Then
        oCell.EntireRow.Select
        Selection.Delete Shift:=xlUp
        i = i - 1
      End If
    Next i
      
End Sub

Thanks for reading this far.

Ray
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: old script fails
  • Next by Date: How to deactivate the "Replies" view in AppleScript Editor ?
  • Previous by thread: Re: old script fails
  • Next by thread: How to deactivate the "Replies" view in AppleScript Editor ?
  • Index(es):
    • Date
    • Thread