Professional Documents
Culture Documents
org/grammar/contractions
Module1
Sub Email_Click()
Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim MyWindow As New clsWindow
Set olApp = GetObject(, "Outlook.Application")
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = ""
.HTMLBody = "Hi"
.Display
Application.Wait Now + TimeValue("00:00:05")
PH = MyWindow.GetWindow("rctrl_renwnd32", "Untitled - Message (HTML) ")
CH = MyWindow.GetChildWindow(PH, "&Send", "Button")
MsgBox CH
For Each s In MyWindow.GetChildWindows(PH)
MsgBox s
Next
.Subject = "Testing"
'SendMessage CH, &HF5, 0, 0&
.Close olDiscard
End With
Set olMail = Nothing
Set olApp = Nothing
End Sub
Module2
Declare Function SetWindowText Lib "user32.dll" Alias "SetWindowTextA" (ByVal Hwnd As Long, ByVal lpString
As String) As Long
Sub Testing()
Dim MyWindow As New clsWindow
'PH = MyWindow.GetWindow("HostExplorer", "1 - mainframe (ms3270)")
'msctls_statusbar32
'MsgBox PH
Childs = MyWindow.GetChildWindows(PH)
Stop
For Each Child In Childs
'If InStr(Child, "AfxFrameOrView90s") Then
'MsgBox Child
If SetWindowText(Split(Child, "-||||-")(2), "Test") > 0 Then
Stop
End If
'End If
Next
End Sub
Module3
'************** Code Start ***************
' This code was originally written by Dev Ashish.
' It is not to be altered or distributed,
' except as part of an application.
' You are free to use it in any application,
' provided the copyright notice is left unchanged.
'
' Code Courtesy of
' Dev Ashish
'
Private Declare Function apiGetClassName Lib "user32" Alias _
"GetClassNameA" (ByVal Hwnd As Long, _
ByVal lpClassname As String, _
ByVal nMaxCount As Long) As Long
Private Declare Function apiGetDesktopWindow Lib "user32" Alias _
"GetDesktopWindow" () As Long
Private Declare Function apiGetWindow Lib "user32" Alias _
"GetWindow" (ByVal Hwnd As Long, _
ByVal wCmd As Long) As Long
Private Declare Function apiGetWindowLong Lib "user32" Alias _
"GetWindowLongA" (ByVal Hwnd As Long, ByVal _
nIndex As Long) As Long
Private Declare Function apiGetWindowText Lib "user32" Alias _
Module4
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassname As String, ByVal
lpWindowName As String) As Long
Public Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal pEnumProc As
Long, ByVal lParam As Long) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Long, ByVal wMsg
As Long, ByVal wParam As Integer, ByVal lParam As Any) As Long
Public Declare Function GetClassNameA Lib "user32" (ByVal Hwnd As Long, ByVal szClassName As String, ByVal
lLength As Long) As Long
Public Declare Function GetWindowTextA Lib "user32" (ByVal Hwnd As Long, ByVal szWindowText As String,
ByVal lLength As Long) As Long
Public ChildWindow As Long
Public ChildTitle As String
Public ChildClass As String
Public Childs()
Public Function GetAllChilds(ByVal Hwnd As Long, ByVal lParam As Long) As Long
Const lBUFFER_LENGTH As Long = 256
Dim lLength As Long
Dim szClassName As String
Dim szWindowText As String
szClassName = String$(lBUFFER_LENGTH, vbNullChar)
lLength = GetClassNameA(Hwnd, szClassName, lBUFFER_LENGTH)
CN = Left$(szClassName, lLength)
szWindowText = String$(lBUFFER_LENGTH, vbNullChar)
lLength = GetWindowTextA(Hwnd, szWindowText, lBUFFER_LENGTH)
TT = Left$(szWindowText, lLength)
ChildWindow = Hwnd
On Error Resume Next
No = 1
No = UBound(Childs) + 1
On Error GoTo 0
ReDim Preserve Childs(1 To IIf(No = 0, 1, No))
Childs(No) = Join(Array(CN, TT, ChildWindow), "-||||-")
GetAllChilds = 1
End Function
clsWindow
Function GetWindow(ByVal ClassName As String, ByVal WindowTitle As String) As Long
GetWindow = FindWindow(ClassName, WindowTitle)
End Function
Function GetChildWindow(ByVal ParentHandle As Long, ByVal ControlText As String, _
ByVal ClassName As String) As Long
ChildTitle = ControlText
ChildClass = ClassName
Option Explicit
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" _
(ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" _
(ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private x As Integer
Private Type winEnum
winHandle As Integer
winClass As Integer
winTitle As Integer
winHandleClass As Integer
winHandleTitle As Integer
winHandleClassTitle As Integer
End Type
Dim winOutputType As winEnum
Public Sub GetWindows()
x=0
winOutputType.winHandle = 0
winOutputType.winClass = 1
winOutputType.winTitle = 2
winOutputType.winHandleClass = 3
winOutputType.winHandleTitle = 4
winOutputType.winHandleClassTitle = 5
GetWinInfo 0&, 0, winOutputType.winHandleClassTitle
End Sub
Case Is > 4
GetWinInfo hWnd, intOffset + 3, OutputType
Case Is > 2
GetWinInfo hWnd, intOffset + 2, OutputType
Case Else
GetWinInfo hWnd, intOffset + 1, OutputType
End Select
'increment by 1 row if no children found
If y = x Then
x=x+1
End If
'now get next window
hWnd = FindWindowEx(hParent, hWnd, vbNullString, vbNullString)
Wend
End Sub
Modules
Module
1
Module
2
Module
Access Basic
Database Overview / Terms / Planning
An overview of databases, database objects and terminology
Tables, Queries, Forms, Reports, Macros and Modules
Planning a database structure and tables
Creating a new database
Working with Tables
Designing a Table, Rules for entering Field Names
Enter data types, field descriptions
Setting a Primary Key and Setting Multiple Primary Keys
Removing a Primary Key
Defining Field Properties(Default values, Input masks, Validation rules and
format)
Insert, Delete, Move and Rename Fields
Table Templates
Importing & Linking Data
Importing from Access and Excel
Linking to an external Access Database Table
Linking to an Excel Workbook using the Wizard
Renaming and Copying Tables
Queries and Filters
Create a filter by selection
Create a filter by form
Save a filter by form as a select query
Running a Select Query
The Query Design Window
Creating a query from the query window
Adding fields to a query
Removing fields from a query
Specifying Text, numeric, date, and logic criteria
Specifying sub string searches using wild Card Characters
Working with Conditions and Operators- BETWEEN, AND, OR, NOT, NULL
Calculated fields
Relationships
3
Why create relationships between tables?
Different types of relationships
Conditions for setting up a relationship
Referential Integrity
Relationships Report
Inserting Subdatasheets
Removing Subdatasheets
Expanding and Contracting Subdatasheets
Multi Table Queries
Multiple Table Queries
Joining Tables for a query
Join Properties - Inner and Outer Joins
Find Unmatched Query Wizard
Find Duplicates Query Wizard
Entering and Editing Data
Switching Views in Access
Entering and Editing Data
Working in Data Entry Mode
Sorting Data, Finding & Replacing Data
Hiding and Unhiding Fields
Module
4
Modules
Module
1
Creating Forms
Creating Forms using the Auto Form Tabular/Datasheet/Pivot Form wizard
Creating Forms Using the Form Wizard
Data Entry in Forms
Resizing and Moving Controls
Changing Text Attributes
Resizing Forms
The Field List Box
Selecting Controls
Formatting Controls
Format Painter and AutoFormat
Resizing and Moving Controls
Properties of an item
Reports
Standard Reports using Wizard
Inserting, Moving, Sizing, deleting controls
Customising Reports
Grouping Data
Using Expressions
Mailing Labels
Page setup
Access Advanced
Relationships
Why create relationships between tables?
Different types of relationships
Conditions for setting up a relationship
Referential Integrity
Advanced Queries
Calculated fields
Parameter Queries
Summary Queries
Crosstab Query Wizard
Editing a Crosstab Query manually
Top Values Query
Make Table Query
Append Query
Delete Query
Update Query
Module
2
Advanced Forms
Composite Forms including Main Form and sub forms
Displaying Yes/No values
Option groups
Command buttons
Setting form properties
Calculations within Forms
Combining Text Values
Changing the data source
Keyboard Short Cuts for Fields
Tab Order
Adding and Removing Filters(Selection and Forms)
Defining Validation Rules
Template Forms
Module
3
Advanced Reports
Using Expressions
Adding Sub Reports
Parameter reports
Report Templates
The Keep Together property
Group on and group interval properties
Advanced Grouping techniques
Page setup
Module
4
Modules
Module
1
Module
2
Module
3
SQL Basics
Why Database?
Difference Between Rdbms And Dbms
Types Of Data Files In Sql Server 2005
Various Types Of Keys
Introduction To Sql Server 2005 Ide
Functions In Sql Server 2005.
Function Like: Date Functions, Rounding Functions, Aggregate Functions, Etc.
Data Types In Sql
Managing Data In Sql Server 2005 (Data Manipulation Language-Dml)
Insert
Complete And Partial Record Insertion)
Update
Delete
Truncate
Retrieving Data In Sql (Data Query Language-Dql)
Simple Select Queries
Where Clause
Queries Using Arithmetic Operators
Queries Using Logical Operators
Distinct Clause
Queries Using Between Clause
Queries Using Functions In Select Queries
Distinct Clause
Queries Using In Operator
Nested Select Queries
Group By Clause
Order By Clause
Module
4
Introduction To Joins
Types Of Joins
Inner Join
Outer Join (Left, Right And Full Outer Joins)
Cross Join
Self Join
Retrieving Data From More Than 2 Tables.
Using Sub-Queries
SQL Advanced
Union and Union All
Views
Stored Procedures
User defined Functions
Triggers
Error Handling
Pivot
Modules
Module
1
HTML
Introduction to HTML
What is HTML?
HTML Tags and types
HTML Basics
Structure of HTML document
Heading
Paragraphs
Links
Images
Module
2
Module
3
Controls
TextBox
Button
Drop down List
Radio Button
Check Box
Reset and Submit Button
JavaScript
Introduction to JavaScript
What is JavaScript?
SSIS
SSIS Architecture
Need of SSIS for ETL Operations
Control Flow Tasks Architecture
Data Flow Tasks Architecture
Data Pipelines and Buffer Usage
SSIS Data Types and Conversions
SSIS Local & Global Variables
Dynamic Precedence Constraints
Dynamic Connection Managers
Data Flow Transformations usage
Handling Enumerations in SSIS
Expressions and Iterations
Data Flow Transformations
Row and Column Transformations
Combining and splitting datasets
Performing database operations
MERGE Vs UNION ALL Transformations
Lookup, Fuzzy Grouping, OLE-DB Command
SORT Vs AGGREGATE Transformations
Type I and Type II SCDs
Performing PIVOT operations
Parent Child Parameters & Options
Event Logging and Event Handling
Configurations and benefits
System Events and Audits
Package Event Handling
Limitations of Event Handling
Benefits of SSIS Logging
Package Execution Audits
Deployment Procedures
Deployment Versioning & Options
SSIS Deployment Phases & Manifest Files
Project Packaging and ISPAC Files
Validation & Verification Techniques
SSIS Checkpoints and Usage
Data Analytics and Debugging
Data Profiler & ADO Connections
Deployment Options & Utilities
Package Execution Options
File System Security Limitations
SSIS Deployment & DB Engine
SSIS Catalog Project Files
Package Migration Utilities
Command-Line Deployments
TDS Sizing and Tuning Options
SSAS
Introduction to SSAS
Need of OLAP Databases and DW Store
Tabular & Multidimensional Modes
Need for Cubes and Measures
Identifying Facts and Dimensions
Identifying Measures and Aggregates
Identifying Attributes and Hierarchies
SSAS Design Entities & Cube Usage
Data Source and Data Source Views
Computed and Named Queries
SSRS
Reporting Services Architecture
Introduction to Reporting Services
Three-Phase Report Life Cycle
Reporting Engine Architecture
SSRS 2012 and Web Service URLs
SSRS 2012 Configuration & Ports
Report Design with Data Sets &
Aggregates
Report Designer Usage and Scope
Report Builder Usage and Scope
Report Manager and Options
Report Delivery & Layout Planning
Enterprise and Ad-hoc Reports
Working with Multiple DataSets
Configuring Dynamic DataSets
Sub Reports Parameters & Filters
Designing Wizard based Reports
Designing Custom Reports
Using Tables and Matrix
Chart Based Reports and Images
Using SSRS Expressions & Global Fields
Sub Reports and Report Options
Report Testing and auto Refresh
BUILD and DEPLOY Options
Parameters and Dynamic Populations
Report Filters in Data Sets
Sub Reports and Nested Reports
Gauge Reports, Indicator Reports
Pie Charts and Data Bars
Exporting Reporting Data
Cube Reports and Report Models
Designing Reports using OLAP DBs
Identifying KPIs and Measures
MDX Queries in Cube Reports
Report Models and parameters
Identifying Report Entities
Identifying different Attributes
Aggregations Based Expressions Calculations
Remote Data Sources & Data Sets
Linked Reports and Graphs
Report Builder Usage & Schedules
Using Report Builder Wizards
Map Reports with UI and Site Settings
Report Parts and Web Services
Report Designer Vs Report Builder
Report Server Configurations Tools
Report Migrations and Precautions
Delivering SSRS Reports
Report Delivery Options & Schedules
Accessing and controlling reports
Leveraging RS Web services
Choosing between Rendering Formats
Managing Reports
Report Manager Configurations
Managing Data Sources Security
Exporting and Importing Reports
Creating Global Schedules Site Level
http://access.mvps.org/access/api/api0013.htm
http://access.mvps.org/access/api/index.html
http://access.mvps.org/access/modules/mdl0062.htm
http://vb.net-informations.com/
http://www.vlsoftware.net/documentation/exportizer/connection-strings-examples.htm
http://www.cimaglobal.com/en-gb/Thought-leadership/Newsletters/Insight-e-magazine/Insight-2012/InsightFebruary-2012/PowerPivot-web-applications-in-action/
http://www.sqldts.com/254.aspx
http://www.sqldts.com/101.aspx
http://www.vbaexpress.com/forum/showthread.php?47310-Need-code-to-merge-PDF-files-in-a-folder-usingadobe-acrobat-X
http://www.ozgrid.com/forum/showthread.php?t=34202&p=171530#post171530
http://www.powerpivotpro.com/excel-power-pivot-user-groups/
https://richnewman.wordpress.com/2007/04/15/a-beginner%E2%80%99s-guide-to-calling-a-net-library-fromexcel/
Power Pivots Books
1. PowerPivot for the Data Analyst: Microsoft Excel 2010 (MrExcel Library)
2. Professional Microsoft PowerPivot for Excel and SharePoint
=================================================================================
Queries
ADO Objects
Cursor Type
Lock type
Order By, Group By, Having Clause
Order By and Group By together
Order By, Group By and having together
Difference between Fun and SP
MDI
Control that can not be used on MDI
ADO.NET Objects
http://www.c-sharpcorner.com/UploadFile/puranindia/ado-net-objects-part-i/
=================================================================================
[Bill_Jelen]_PowerPivot_for_the_Data_Analyst_Micr(BookZZ.org).pdf
[Sivakumar_Harinath,_Ron_Pihlgren,_Denny_Guang-Yeu(BookZZ.org).pdf
=================================================================================
Best Array
Sub Testing()
Text = Array("1-ABC||2-XYZ||3-PQR||4-LMN", "1-LMN||2-456||3-789||4-101112", "1-ABC||2-XYZ||3PQR||4-LMN", "1-123||2-Done||3-789||4-101112")
NewText = Filter(Split(Join(Filter(Text, "LMN"), "||"), "||"), "2-")
MsgBox Join(NewText, vbNewLine)
End Sub
=================================================================================
C# Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Exl = Microsoft.Office.Interop.Excel;
using Path = System.IO.Path;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Exl.Workbook Book;
Exl.Worksheet Sheet;
Exl.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
xlApp.Visible=true;
Book = xlApp.Workbooks.Add();
Sheet = (Exl.Worksheet)Book.Sheets.get_Item(1);
Sheet.Range["A1"].Value = button1.Text;
Sheet.Range["A2"].Value = comboBox1.Text;
string FPath = "C:\\Documents and Settings\Testing";
Book.SaveAs(FPath.ToString(),56);
Book.Close(false);
xlApp.Quit();
}
}
}
=================================================================================
BCB
=================================================================================
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal
lpWindowName As String) As Long
Private Declare Function EnumChildWindows Lib "User32" (ByVal hWndParent As Long, ByVal pEnumProc As
Long, ByVal lParam As Long) As Long
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg
As Long, ByVal wParam As Integer, ByVal lParam As Any)
As Long
Private Declare Function GetClassNameA Lib "User32" (ByVal hWnd As Long, ByVal szClassName As String,
ByVal lLength As Long) As Long
Private Declare Function GetWindowTextA Lib "User32" (ByVal hWnd As Long, ByVal szWindowText As String,
ByVal lLength As Long) As Long
Private Const BM_CLICK = &HF5
Private Const WM_SETTEXT = &HC
Private mlChildhWnd As Long
Private ChildWindowTitle As String
Private ChildWindowClass As String
Public Function lEnumChildProc(ByVal hWnd As Long, ByVal lParam As Long) As Long
Const lBUFFER_LENGTH As Long = 256
Dim lReturn As Long
Dim lLength As Long
Dim szClassName As String
Dim szWindowText As String
lReturn = 1
szClassName = String$(lBUFFER_LENGTH, vbNullChar)
lLength = GetClassNameA(hWnd, szClassName, lBUFFER_LENGTH)
If Left$(szClassName, lLength) = ChildWindowClass Then
szWindowText = String$(lBUFFER_LENGTH, vbNullChar)
lLength = GetWindowTextA(hWnd, szWindowText, lBUFFER_LENGTH)
If Left$(szWindowText, lLength) = ChildWindowTitle Then
mlChildhWnd = hWnd
lReturn = 0
End If
End If
lEnumChildProc = lReturn
End Function
Sub Email_Click()
Dim olApp As Outlook.Application
Dim olMail As MailItem
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = ""
.HTMLBody = "Hi"
.Display
Application.Wait Now + TimeValue("00:00:05")
hWnd1 = FindWindow("rctrl_renwnd32", "Untitled - Message (HTML) ")
ChildWindowTitle = "&Send"
ChildWindowClass = "Button"
EnumChildWindows hWnd1, AddressOf lEnumChildProc, 0&
.Subject = "Testing"
SendMessage mlChildhWnd, &HF5, 0, 0&
Application.Wait Now + TimeValue("00:00:05")
End With
Set olMail = Nothing
Set olApp = Nothing
End Sub
=================================================================================
Get Window Class Name
=================================================================================
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal
lpWindowName As String) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hWnd As Long, ByVal
lpClassName As String, ByVal nMaxCount As Long) As Long
Function ClassName(ByVal WindowTitle As String) As String
Dim hWnd As Long
Dim lpClassName As String
Dim nMaxCount As Long
Dim lresult As Long
nMaxCount = 256
lpClassName = Space(nMaxCount)
hWnd = FindWindow(vbNullString, WindowTitle)
lresult = GetClassName(hWnd, lpClassName, nMaxCount)
'MsgBox WindowTitle
ClassName = Left$(lpClassName, lresult)
End Function
Sub Testing()
'MsgBox ClassName("vba code to get windowclass - Google Search - Google Chrome")
'MsgBox ClassName("Untitled - Message (HTML) ")
MsgBox ClassName("Microsoft Lync
")
'MsgBox ClassName("C:\Documents and Settings\Desktop\Books")
End Sub