This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
OlderNewer