Useful Macros

To be used with the VBA Enterpad

By using some of these macros, you can quickly add more functionality to your Enterpad. Those extra buttons that haven't been assigned a task yet are just waiting to be used to save even more time.

Come back for updates! The Enterpad already builds more efficiency into your workflow, but the door is always open to the potential for even more imaginative ideas.

Excel

Sub EP_1()
  ThisWorkbook.SaveCopyAs Filename:=ThisWorkbook.Path & _
  "\" & Format(Date, "mm-dd-yy") & " " & ThisWorkbook.Name
End Sub
  
Sub EP_1()
	ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub EP_1()
	ActiveSheet.Unprotect
End Sub
Sub EP_1()
  ActiveWindow.SelectedSheets.Delete
End Sub
  
Sub EP_1()
  Application.DisplayAlerts = False
  ActiveWindow.SelectedSheets.Delete
  Application.DisplayAlerts = True
End Sub
  
Sub EP_1()
  With Selection.Interior
    .Pattern = xlSolid
    .PatternColorIndex = xlAutomatic
    .Color = 5296274
    .TintAndShade = 0
    .PatternTintAndShade = 0
  End With
End Sub
Sub EP_1()
  With Rows(Selection.Row).Interior
    .ColorIndex = 6
    .Pattern = xlSolid
  End With
End Sub
Sub EP_1()
	Rows(Selection.Row).Interior.ColorIndex = xlNone
End Sub
Sub EP_1()
  With Columns(Selection.Column).Interior
    .ColorIndex = 6
    .Pattern = xlSolid
  End With
End Sub
Sub EP_1()
	Columns(Selection.Column).Interior.ColorIndex = xlNone
End Sub

Word

Sub EP_1()
  Selection.PasteSpecial DataType:=wdPasteText
End Sub
Sub EP_1()
	Selection.Range.HighlightColorIndex = wdYellow
End Sub
Sub EP_1()
  Selection.Range.HighlightColorIndex = wdNoHighlight
End Sub
Sub EP_1()
  Selection.InsertAfter Chr(34)
  Selection.InsertBefore Chr(34)
End Sub
Sub EP_1()
  MsgBox ActiveDocument.ComputeStatistics(Statistic:=wdStatisticWords, _
  IncludeFootnotesAndEndnotes:=True) & " words"
End Sub
Sub EP_1()
	Selection.InsertDateTime Format(Now(), "yyyy-mm-dd")
End Sub
Sub EP_1()
	Selection.Font.Bold = True
End Sub
Sub EP_1()
	Selection.Font.Bold = False
End Sub
Sub EP_1()
	Selection.Font.Color = wdColorRed
End Sub
Sub EP_1()
	Selection.Font.Color = wdColorAutomatic
End Sub
Sub EP_1()
	Selection.TypeText Text:="Text to insert"
End Sub
Sub EP_1()
  Selection.TypeText Text:="First line of text to insert"
  Selection.TypeText vbVerticalTab
  Selection.TypeText Text:="Second line of text to insert"
End Sub

vbVerticalTab used at the end of line three emulates Shift+Enter (also known as manual line break, soft return). There will be no extra blank line to separate the two lines of inserted text.

vbNewLine (instead of vbVerticalTab) can be used to emulate a paragraph change. There will be an extra blank line to separate the two lines of inserted text.


Comments

No comments yet.

Add Comment

* Required information
(never displayed)
 
Bold Italic Underline Strike Superscript Subscript Code Quote Line Bullet Numeric Link Email Image Video
 
1000
What is the opposite word of small?
 
Enter answer:
 
Notify me of new comments via email.
 
Remember my form inputs on this computer.
 

 

Thank you! We will get back to you shortly.

X

Contact Us

support@cedeq.com

Please check for errors and submit again.

Your Name *

Company

Contact Phone

Your E-Mail *

Confirm E-Mail *

Subject