Fabio2 Un/Comment Macro

Now that Fabio2 is getting big and powerful, just like Chewbacca, we found we could really use a couple of Excel macros to comment out, and uncomment, sections of Fabio data files with a click.  With the power of the Internet, and a little magic, we developed these:

Sub Fabio2CommentOut()
'
' Fabio2CommentOut Macro
'
' Keyboard Shortcut: Ctrl+k
'
 Dim myCell As Range
 For Each myCell In Selection
 If Not IsEmpty(myCell) Then _
 myCell = "%%" & myCell
 Next myCell
End Sub

Sub Fabio2Uncomment()
'
' Fabio2Uncomment Macro
'
' Keyboard Shortcut: Ctrl+l
'
 Dim myCell As Range
 For Each myCell In Selection
 If Left(myCell, 2) = "%%" Then _
 myCell = Right(myCell, Len(myCell) - 2)
 Next myCell

End Sub

Posted in Uncategorized