Advertisement
oshkoshbagoshh

selectRangeWithMouse_bold

Aug 18th, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '**************************************************************
  2. ' Select a Range with your mouse then bolds them
  3. '    NOTE: Can change from bold to something else
  4. '***********************************************************
  5.  
  6.  
  7. Sub RangeDataType()
  8.  
  9. Dim rRange As Range
  10.  
  11.  
  12.  
  13.     On Error Resume Next
  14.  
  15.         Application.DisplayAlerts = False
  16.  
  17.             Set rRange = Application.InputBox(Prompt:= _
  18.                 "Please select a range with your Mouse to be bolded.", _
  19.                     Title:="SPECIFY RANGE", Type:=8)
  20.  
  21.     On Error GoTo 0
  22.  
  23.         Application.DisplayAlerts = True
  24.  
  25.  
  26.  
  27.         If rRange Is Nothing Then
  28.  
  29.             Exit Sub
  30.  
  31.         Else
  32.  
  33.             rRange.Font.Bold = True
  34.  
  35.         End If
  36.  
  37.        
  38.  
  39. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement