Skip to content

Instantly share code, notes, and snippets.

<script type="text/javascript">   var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-XXXXX-X']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })(); </script>
@ijd65
ijd65 / Hidden Div.html
Created September 30, 2013 03:07
Hidden Div for storing keywords
<div style="visibility: hidden">Keyword1 Keyword2 Keyword3</div>
@ijd65
ijd65 / Standard Head Tags.html
Created September 30, 2013 02:59
Standard HTML Head Tags
<title>my title</title> <meta name="description" content="a really good description">
@ijd65
ijd65 / Compact Databse
Created September 27, 2013 06:27
Compact & repair the current Access database
Public Sub CompactDB()
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Sub
@ijd65
ijd65 / Delete Row based on conditions
Created September 4, 2013 03:30
Delete Row based on multiple criteria Change Sheet(1) to required Sheet
Sub DeleteRows()
Dim x As Long
With Sheets(1)
For x = .UsedRange.Rows.Count To 2 Step -1
If .Cells(x, 1) < 0.2 And .Cells(x, 2) > 0.3 And .Cells(x, 3) > 10 Then
.Rows(x).Delete
End If
Next
End With
End Sub
@ijd65
ijd65 / Hidden Text
Created August 29, 2013 12:56
Hide text on page for Google search engine, replace ... with required text
<div style="display:none">...</div>
@ijd65
ijd65 / Infopath Form Window Name
Created August 15, 2013 03:06
Sets the window of the Infopath form to the name you specify
function XDocument::OnSwitchView(eventObj)
{
XDocument.View.Window.Caption = "Name of Form";
}
@ijd65
ijd65 / Access Warnings
Last active January 15, 2018 08:36
Turn off error /result display
DoCmd.SetWarnings (False)
DoCmd.SetWarnings (True)
@ijd65
ijd65 / Wipe Row if Text not found
Created July 29, 2013 01:10
This will wipe the row if specified text is not found in a particular column
Public Function GetLastRow(ByVal rngToCheck As Range) As Long
Dim rngLast As Range
Set rngLast = rngToCheck.Find(what:="*", searchorder:=xlByRows, searchdirection:=xlPrevious)
If rngLast Is Nothing Then
GetLastRow = rngToCheck.Row
Else
GetLastRow = rngLast.Row
@ijd65
ijd65 / Copy Range
Created July 25, 2013 00:33
Copy a specified range from multiple worksheets into a master worksheet
'Fill in the range that you want to copy
'Set CopyRng = sh.Range("A1:G1")
Sub CopyRangeFromMultiWorksheets()
Dim sh As Worksheet
Dim DestSh As Worksheet
Dim Last As Long
Dim CopyRng As Range
With Application