gyetvaig

VBA Get RGB of a cell background color

Jan 16th, 2019
6,080
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ' ----------------------------------------------------------------
  2. ' Procedure Name: f_getRGBCellBackground
  3. ' Purpose: get the RGB value of a cell background color
  4. ' ----------------------------------------------------------------
  5. Function f_getRGBCellBackground(cell As Range, Optional partialColor As String) As Variant
  6.  
  7.     Dim backGroundColor As Long
  8.     Dim red As Long
  9.     Dim green As Long
  10.     Dim blue As Long
  11.  
  12.     backGroundColor = cell.Interior.Color
  13.    
  14.     red = backGroundColor Mod 256
  15.     green = backGroundColor \ 256 Mod 256
  16.     blue = backGroundColor \ 65536 Mod 256
  17.    
  18.     If partialColor <> vbNullString Then
  19.    
  20.         Select Case partialColor
  21.            
  22.             Case "red"
  23.            
  24.                 f_getRGBCellBackground = CLng(red)
  25.            
  26.             Case "green"
  27.                
  28.                 f_getRGBCellBackground = CLng(green)
  29.            
  30.             Case "blue"
  31.                
  32.                 f_getRGBCellBackground = CLng(blue)
  33.            
  34.             Case Else
  35.                
  36.                 f_getRGBCellBackground = "error in parameter"
  37.        
  38.         End Select
  39.        
  40.     Else
  41.    
  42.         f_getRGBCellBackground = Right("000" & red, 3) & " | " & Right("000" & green, 3) & " | " & Right("000" & blue, 3)
  43.        
  44.     End If
  45.    
  46. End Function
Advertisement
Comments
  • Ronjulix
    230 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment