Skip to content

Instantly share code, notes, and snippets.

Sancarn sancarn

Block or report user

Report or block sancarn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sancarn
sancarn / CShapeEvents.cls
Created Jul 15, 2019
Shape events in VBA
View CShapeEvents.cls
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "CShapeEvents"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private old_selection As Object
View VBA Excel Events.md

Summary

Excel.Worksheet
Excel.Workbook
Excel.QueryTable
Excel.OLEObject
Excel.Chart
Excel.Application
@sancarn
sancarn / test.md
Last active Jul 5, 2019
VBA Pointers and SizeOf()
View test.md
  Dim x01 As Boolean
  Dim x02 As Byte
  Dim x03 As Currency
  Dim x04 As Date
  Dim x05 As Double
  Dim x06 As Integer
  Dim x07 As Long
  Dim x08 As LongPtr
  Dim x09 As MsoRGBType
View A_.ahk
class A_ {
class COM {
GetActiveObject(){
}
GetActiveObjects(){
}
class _COMObject {
__New(obj){
@sancarn
sancarn / Modelling in Excel.yaml
Created Dec 8, 2018
GIS Embedded in Excel - Shared with Script Lab
View Modelling in Excel.yaml
name: Modelling in Excel
description: GIS Embedded in Excel
author: sancarn
host: EXCEL
api_set: {}
script:
content: |-
MakeMap()
var data = {}
@sancarn
sancarn / VbaJsBridge.yaml
Created Dec 8, 2018
Shared with Script Lab
View VbaJsBridge.yaml
name: VbaJsBridge
description: ''
author: sancarn
host: EXCEL
api_set: {}
script:
content: |-
//Initialise VbaJsBridge
VbaJsBridge_Initiate();
var Timer: Number = 1000;
View Code for Claudio.vb
Public HeaderColor as Long
Private OptionsSheet as Worksheet
Private DataSheet as Worksheet
Private Sub Worksheet_Change(ByVal Target As Range)
Me.HeaderColor = RGB(217, 217, 217)
set OptionsSheet = sheets("Options")
set DataSheet = ActiveWorksheet
if target.address = "$B$1" then
@sancarn
sancarn / .Object.query.md
Last active Oct 16, 2018
Query javascript objects for a specific structure
View .Object.query.md

Object::query()

Say you have some object:

var data = [
  {
    type:"Person",
    name: "Suzanne",
    pets:[
@sancarn
sancarn / Idea.md
Last active Sep 16, 2018
Ruby hash/type parser for javascript
View Idea.md

Simplify _getList and _getKeyValues

function measureDepth(depth,index,sectionString){
  switch(sectionString[index]){
      case "{":
        depth["{}"]++;
        break;
      case "}":
        depth["{}"]--;
You can’t perform that action at this time.