Skip to content

Instantly share code, notes, and snippets.

View DataSolveProblems's full-sized avatar
💭
Github Working In Progress

Jie Jenn DataSolveProblems

💭
Github Working In Progress
View GitHub Profile
@DataSolveProblems
DataSolveProblems / script.vb
Created February 17, 2019 08:18
Insert & Remove Check Mark When You Double Click Mouse
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 1 And Target.Value <> Chr(214) Then
With Target
.Value = Chr(214)
.Font.Name = "Symbol"
.Font.FontStyle = "Regular"
.Font.Size = 12
.HorizontalAlignment = xlCenter
Public Function Vlookup2(ByVal Lookup_Value As String, ByVal Cell_Range As Range, ByVal Column_Index As Integer) As Variant
Dim cell As Range
Dim Result_String As String
On Error GoTo errHandle
For Each cell In Cell_Range
If cell.Value = Lookup_Value Then
Sub Export_Images()
Dim Destination_Folder As String
Dim sld As Slide
Dim shp As Shape
Destination_Folder = "<Folder Path>"
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
from PyQt5.QtSql import QSqlDatabase, QSqlQueryModel, QSqlQuery
from PyQt5.QtWidgets import QTableView, QApplication
import sys
SERVER_NAME = '<Server Name>'
DATABASE_NAME = '<Database Name>'
USERNAME = ''
PASSWORD = ''
def createConnection():
Sub List_Email_Info()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim i As Long ' Row tracker
Dim arrHeader As Variant
Dim olNS As NameSpace
Dim olInboxFolder As MAPIFolder
Dim olItems As Items
Dim olMailItem As MailItem
Option Explicit
Const FOLDER_SAVED As String = "<Destination Folder Path>" `Makes sure your folder path ends with a backward slash
Const SOURCE_FILE_PATH As String = "<Data File Path>"
Sub TestRun()
Dim MainDoc As Document, TargetDoc As Document
Dim dbPath As String
Dim recordNumber As Long, totalRecord As Long
import sys
from PyQt5.QtWidgets import QWidget, QProgressBar, QPushButton, QApplication
from PyQt5.QtCore import QBasicTimer
class ProgressBarDemo(QWidget):
def __init__(self):
super().__init__()
self.progressBar = QProgressBar(self)
self.progressBar.setGeometry(30, 40, 200, 25)
Option Explicit
Dim wsLOE As Worksheet, wsTrail As Worksheet
Dim PreviousValue As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
Set wsTrail = ThisWorkbook.Worksheets("Trail")
If Target.Column = 3 Or Target.Column = 4 Then
import sys
import pandas as pd
from PyQt5.QtWidgets import QApplication, QTableView
from PyQt5.QtCore import QAbstractTableModel, Qt
df = pd.DataFrame({'a': ['Mary', 'Jim', 'John'],
'b': [100, 200, 300],
'c': ['a', 'b', 'c']})
class pandasModel(QAbstractTableModel):
Option Explicit
Private Const Password As String = "xyz"
Sub Protect_Data_Sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If UCase(ws.Name) <> "SUMMARY" Then