<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>CodeKeep VB6 Feed</title>
    <description>The latest and greatest VB6 code snippets publicly available</description>
    <link>http://www.codekeep.net/feeds.aspx</link>
    <lastBuildDate>Tue, 12 Jun 2012 22:54:46 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>RSS.NET: http://www.rssdotnet.com/</generator>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CodeKeepVB6" /><feedburner:info uri="codekeepvb6" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Alternating Table Row Colors in SSRS</title>
      <description>Description: Alternating Table Row Colors in SSRS&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/50af7412-f2fd-4080-84b7-ca3e3c49ee38.aspx'&gt;http://www.codekeep.net/snippets/50af7412-f2fd-4080-84b7-ca3e3c49ee38.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;= IIf(RowNumber(Nothing) Mod 2 = 0, &amp;quot;Silver&amp;quot;, &amp;quot;Transparent&amp;quot;)
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/CyIJ36eHG2g" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/CyIJ36eHG2g/50af7412-f2fd-4080-84b7-ca3e3c49ee38.aspx</link>
      <pubDate>Tue, 12 Jun 2012 22:54:46 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/50af7412-f2fd-4080-84b7-ca3e3c49ee38.aspx</feedburner:origLink></item>
    <item>
      <title>Nz in VB 6 etc.</title>
      <description>Description: VBA has a function Nz that checks for null, VB6 etc. does not&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/6fee24fa-56b7-49a0-99ed-aee19233bbbe.aspx'&gt;http://www.codekeep.net/snippets/6fee24fa-56b7-49a0-99ed-aee19233bbbe.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Function Nz(ByVal V As Variant, Optional ByVal ValueIfNull As Variant) As Variant
	If Not IsNull(V) Then
		Nz = V
	Else
		If IsMissing(ValueIfNull) Then
			If VarType(V) = vbString Then
				Nz = &amp;quot;&amp;quot;
			Else
				Nz = 0
			End If
		Else
			V = ValueIfNull
		End If
	End If
End Function
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/dWbSnji5bnM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/dWbSnji5bnM/6fee24fa-56b7-49a0-99ed-aee19233bbbe.aspx</link>
      <pubDate>Mon, 02 Aug 2010 14:15:55 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/6fee24fa-56b7-49a0-99ed-aee19233bbbe.aspx</feedburner:origLink></item>
    <item>
      <title>Extended color enumeration for VB</title>
      <description>Description: Extended color enumeration for VB&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/2e25cebc-d194-4ce6-ade2-5b774a064c05.aspx'&gt;http://www.codekeep.net/snippets/2e25cebc-d194-4ce6-ade2-5b774a064c05.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Public Enum ExtendedColorTypes
    'vbWhite = &amp;amp;HFFFFFF
    vbLightGray = &amp;amp;HE0E0E0
    vbGray = &amp;amp;HC0C0C0
    vbMediumGray = &amp;amp;H808080
    vbDarkGray = &amp;amp;H404040
    'vbBlack = &amp;amp;H0
    vbPaleRed = &amp;amp;HC0C0FF
    vbLightRed = &amp;amp;H8080FF
    'vbRed = &amp;amp;HFF
    vbMediumRed = &amp;amp;HC0&amp;amp;
    vbDarkRed = &amp;amp;H80&amp;amp;
    vbBlackRed = &amp;amp;H40&amp;amp;
    vbPaleOrange = &amp;amp;HC0E0FF
    vbLightOrange = &amp;amp;H80C0FF
    vbOrange = &amp;amp;H80FF&amp;amp;
    vbMediumOrange = &amp;amp;H40C0&amp;amp;
    vbDarkOrange = &amp;amp;H4080&amp;amp;
    vbBlackOrange = &amp;amp;H404080
    vbPaleYellow = &amp;amp;HC0FFFF
    vbLightYellow = &amp;amp;H80FFFF
    'vbYellow = &amp;amp;HFFFF
    vbMediumYellow = &amp;amp;HC0C0&amp;amp;
    vbDarkYellow = &amp;amp;H8080&amp;amp;
    vbBlackYellow = &amp;amp;H4040&amp;amp;
    vbPaleGreen = &amp;amp;HC0FFC0
    vbLightGreen = &amp;amp;H80FF80
    'vbGreen = &amp;amp;HFF00
    vbMediumGreen = &amp;amp;HC000&amp;amp;
    vbDarkGreen = &amp;amp;H8000&amp;amp;
    vbBlackGreen = &amp;amp;H4000&amp;amp;
    vbPaleCyan = &amp;amp;HFFFFC0
    vbLightCyan = &amp;amp;HFFFF80
    'vbCyan = &amp;amp;HFFFF00
    vbMediumCyan = &amp;amp;HC0C000
    vbDarkCyan = &amp;amp;H808000
    vbBlackCyan = &amp;amp;H404000
    vbPaleBlue = &amp;amp;HFFC0C0
    vbLightBlue = &amp;amp;HFF8080
    'vbBlue = &amp;amp;HFF0000
    vbMediumBlue = &amp;amp;HC00000
    vbDarkBlue = &amp;amp;H800000
    vbBlackBlue = &amp;amp;H400000
    vbPalePurple = &amp;amp;HFFC0FF
    vbLightPurple = &amp;amp;HFF80FF
    vbPurple = &amp;amp;HFF00FF
    'vbMagenta = &amp;amp;HFF00FF
    vbMediumPurple = &amp;amp;HC000C0
    vbDarkPurple = &amp;amp;H800080
    vbBlackPurple = &amp;amp;H400040
End Enum

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/Hk4-1ZqW514" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/Hk4-1ZqW514/2e25cebc-d194-4ce6-ade2-5b774a064c05.aspx</link>
      <pubDate>Mon, 07 Jun 2010 12:26:02 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/2e25cebc-d194-4ce6-ade2-5b774a064c05.aspx</feedburner:origLink></item>
    <item>
      <title>Print errors from failed db connect</title>
      <description>Description: Print errors from failed db connect&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/1497bfb4-73c6-4e19-a55c-b3f1468a3840.aspx'&gt;http://www.codekeep.net/snippets/1497bfb4-73c6-4e19-a55c-b3f1468a3840.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;if aCnx.Errors.Count &amp;lt;&amp;gt; 0 Then
For each errItem in aCnx.Errors
         If errItem.Number &amp;lt;&amp;gt; 0 Then
            Response.Write &amp;quot;&amp;lt;br&amp;gt;NativeError = &amp;quot; &amp;amp; errItem.NativeError
            Response.Write &amp;quot;&amp;lt;br&amp;gt;Description = &amp;quot; &amp;amp; errItem.Description
            Response.Write &amp;quot;&amp;lt;br&amp;gt;SQLState    = &amp;quot; &amp;amp; errItem.SQLState
            Response.Write &amp;quot;&amp;lt;br&amp;gt;Source      = &amp;quot; &amp;amp; errItem.Source
         End If
      Next
  Response.End
End If

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/232rMT_H_rs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/232rMT_H_rs/1497bfb4-73c6-4e19-a55c-b3f1468a3840.aspx</link>
      <pubDate>Wed, 05 Sep 2007 19:34:34 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/1497bfb4-73c6-4e19-a55c-b3f1468a3840.aspx</feedburner:origLink></item>
    <item>
      <title>Determine if running from EXE or IDE</title>
      <description>Description: Determines if the program is executing as a compiled EXE or in debug mode from within the VB6 IDE.&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/3d176440-20b7-4624-830b-a00bc2efdfec.aspx'&gt;http://www.codekeep.net/snippets/3d176440-20b7-4624-830b-a00bc2efdfec.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Public Function RunningFromIDE() As Boolean
    On Error GoTo ErrHandler
    'Because debug statements are ignored when the app is compiled, the next statment will never be executed in the EXE.
    Debug.Print 1 / 0
    RunningFromIDE = False
    Exit Function
ErrHandler:
    'If we get an error then we are running in IDE / Debug mode
    RunningFromIDE = True
End Function&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/5Yu8sbjbFfk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/5Yu8sbjbFfk/3d176440-20b7-4624-830b-a00bc2efdfec.aspx</link>
      <pubDate>Thu, 17 May 2007 16:16:27 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/3d176440-20b7-4624-830b-a00bc2efdfec.aspx</feedburner:origLink></item>
    <item>
      <title>List DB's on an sql</title>
      <description>Description: List db's&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/e37f3144-bf25-4400-85f1-2c4e017761c0.aspx'&gt;http://www.codekeep.net/snippets/e37f3144-bf25-4400-85f1-2c4e017761c0.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Private Sub GetDatabase(strServer As String)

    Dim strDatabase As String
    Dim strPassword As String
    Dim i As Integer
    Dim oSQLServer As SQLDMO.SQLServer
    
    On Error Resume Next
    Set oSQLServer = New SQLDMO.SQLServer
    With oSQLServer
	'
	' You may or may not need this bit
	'
    '.LoginSecure = True 
    .Connect strServer, &amp;quot;username&amp;quot;, &amp;quot;password&amp;quot;
    
    For i = 1 To .Databases.Count

          strDatabase = .Databases(i).Name
            Me.Combo1.AddItem strDatabase
    Next

   oSQLServer.Close
End With
   Set oSQLServer = Nothing

End Sub&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/AvNUm9HN4aM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/AvNUm9HN4aM/e37f3144-bf25-4400-85f1-2c4e017761c0.aspx</link>
      <pubDate>Thu, 26 Oct 2006 08:17:41 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/e37f3144-bf25-4400-85f1-2c4e017761c0.aspx</feedburner:origLink></item>
    <item>
      <title>List SQL Server</title>
      <description>Description: List all the available SQL servers&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/35e55a49-0a55-4736-bd7b-b459a09f36c0.aspx'&gt;http://www.codekeep.net/snippets/35e55a49-0a55-4736-bd7b-b459a09f36c0.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Dim oSQLServer As SQLDMO.SQLServer
    Dim lngIndex As Long
    Dim nlServers As SQLDMO.NameList
    Dim strHostName As String
    Dim lngFoundComma As Long
On Error Resume Next
    
    Set oSQLServer = New SQLDMO.SQLServer
    cmbServer.Clear
    cmbServer.Text = &amp;quot;Select a Server&amp;quot;
    Set nlServers = oSQLServer.Application.ListAvailableSQLServers
    
    For lngIndex = 1 To nlServers.Count
strHostName = nlServers.Item(lngIndex)
        If strHostName Like &amp;quot;*.*.*.*&amp;quot; Then
            lngFoundComma = InStr(strHostName, &amp;quot;,&amp;quot;)
            If lngFoundComma &amp;gt; 0 Then
                strHostName = Left$(strHostName, lngFoundComma - 1)
            End If
        End If
        cmbServer.AddItem strHostName
    Next
oSQLServer.Close
    Set oSQLServer = Nothing&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/AcETlBfL6Fw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/AcETlBfL6Fw/35e55a49-0a55-4736-bd7b-b459a09f36c0.aspx</link>
      <pubDate>Thu, 26 Oct 2006 08:02:20 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/35e55a49-0a55-4736-bd7b-b459a09f36c0.aspx</feedburner:origLink></item>
    <item>
      <title>FileReadToAarry_fbas</title>
      <description>Description: Liest eine Text Datei in ein Arry&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/493450bf-49f1-43fe-ae98-9241d699eeb6.aspx'&gt;http://www.codekeep.net/snippets/493450bf-49f1-43fe-ae98-9241d699eeb6.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt; Function FileReadToAarry_fbas(ByVal lstrDirNameExt As String, _
                                   varArryVar() As Variant, _
                         Optional fLbolIgnorRemarkt As Boolean = False) As Long
  ' Comments   : Liest eine Text Datei in ein Arry
    
  
  Dim lngLlngNLines As Long
  lngLlngNLines = 0
  
  If FileFindBol_fbas(lstrDirNameExt) Then
     Dim fs As New Scripting.FileSystemObject
     Dim ts As Scripting.TextStream
     Set ts = fs.OpenTextFile(lstrDirNameExt, ForReading)
   
     Dim lstrInputBuff As String
     Dim fLbolAddLineToArry As Boolean
     Do While ts.AtEndOfStream &amp;lt;&amp;gt; True  ' Schleife bis Dateiende.
       lstrInputBuff = ts.ReadLine
       fLbolAddLineToArry = True
      
       If fLbolIgnorRemarkt Then
          fLbolAddLineToArry = (False = fbasIsStrRemarkt(lstrInputBuff))
       End If
       
       If fLbolAddLineToArry Then
         lngLlngNLines = lngLlngNLines + 1
         ReDim Preserve varArryVar(lngLlngNLines - 1)
         varArryVar(lngLlngNLines - 1) = lstrInputBuff
       End If
     Loop
     ts.Close
     Set ts = Nothing
     Set fs = Nothing
  Else
     lngLlngNLines = -1
  End If
  
  
ExitFun:
  FileReadToAarry_fbas = lngLlngNLines
  Exit Function
  
ExitErr:
  FileReadToAarry_fbas = lngLlngNLines
  Resume ExitFun:
End Function


&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/reRr-U4a6Es" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/reRr-U4a6Es/493450bf-49f1-43fe-ae98-9241d699eeb6.aspx</link>
      <pubDate>Thu, 12 Jan 2006 08:13:06 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/493450bf-49f1-43fe-ae98-9241d699eeb6.aspx</feedburner:origLink></item>
    <item>
      <title>Create excel spreadsheet VB6</title>
      <description>Description: This code dynamically creates an excel spreadsheet, some simple formatting and populates.&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/1047d469-6fe6-486c-8e3c-d6a931c36406.aspx'&gt;http://www.codekeep.net/snippets/1047d469-6fe6-486c-8e3c-d6a931c36406.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;'Must add reference to &amp;quot;Microsoft Excel 10.0 Object Library&amp;quot;

Dim xlObj As Object, xlBook As Excel.Workbook, xlWs As Excel.Worksheet
Dim i as Integer

Set xlObj = CreateObject(&amp;quot;Excel.Application&amp;quot;)
Set xlBook = xlObj.Workbooks.Add
Set xlWs = xlBook.Worksheets(&amp;quot;sheet1&amp;quot;)

xlWs.Rows(1).RowHeight = 20  'Make Header row taller
xlWs.Range(xlWs.Cells(1, 1), xlWs.Cells(1, 4)).Merge
xlWs.Range(xlWs.Cells(1, 5), xlWs.Cells(1, 10)).Merge
    
xlWs.Cells(1, 1).HorizontalAlignment = Excel.xlCenter
xlWs.Cells(1, 1).Font.Size = 13
xlWs.Cells(1, 1).Font.Bold = True
xlWs.Cells(1, 1).Value = &amp;quot;Header Row 1&amp;quot;
   
xlWs.Cells(1, 5).HorizontalAlignment = Excel.xlCenter
xlWs.Cells(1, 5).Font.Size = 13
xlWs.Cells(1, 5).Font.Bold = True
xlWs.Cells(1, 5).Value = &amp;quot;Header Row 2&amp;quot;

For i = 3 to 50'populate rows
     xlWs.Cells(i, 1).Value = &amp;quot;Row 1 Data &amp;quot; &amp;amp; i
     xlWs.Cells(i, 5).Value = &amp;quot;Row 2 Data &amp;quot; &amp;amp; i
Next i

xlWs.Columns(&amp;quot;A:ZZ&amp;quot;).AutoFit
xlWs.Columns(&amp;quot;A:ZZ&amp;quot;).Font.Size = 8
xlObj.Visible = True 'Show Report

'Clean up Excel resources
Set xlObj = Nothing
Set xlBook = Nothing
Set xlWs = Nothing&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/Vm_hsQfOxe4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/Vm_hsQfOxe4/1047d469-6fe6-486c-8e3c-d6a931c36406.aspx</link>
      <pubDate>Fri, 16 Dec 2005 06:02:26 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/1047d469-6fe6-486c-8e3c-d6a931c36406.aspx</feedburner:origLink></item>
    <item>
      <title>PCUser Function</title>
      <description>Description: VB6 function for getting the Windows user name&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/84ab5fcb-80d7-4be5-9032-41f2b3efe6a7.aspx'&gt;http://www.codekeep.net/snippets/84ab5fcb-80d7-4be5-9032-41f2b3efe6a7.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Private Declare Function GetUserName Lib &amp;quot;advapi32.dll&amp;quot; Alias &amp;quot;GetUserNameA&amp;quot; (ByVal lpBuffer As String, nSize As Long) As Long
'''''

Public Function PCUser() As String
    Dim lNameLength As Long
    Dim lResult As String
    Static sPCUser As String
    If sPCUser = &amp;quot;&amp;quot; Then
        sPCUser = String(200, 32)
        lNameLength = 200
        lResult = GetUserName(sPCUser, lNameLength)
        sPCUser = Left(Trim(sPCUser), Len(Trim(sPCUser)) - 1)
    End If
    PCUser = sPCUser
End Function

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/f7cZZ3IRkSc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/f7cZZ3IRkSc/84ab5fcb-80d7-4be5-9032-41f2b3efe6a7.aspx</link>
      <pubDate>Thu, 08 Dec 2005 20:16:03 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/84ab5fcb-80d7-4be5-9032-41f2b3efe6a7.aspx</feedburner:origLink></item>
    <item>
      <title>PCName Function</title>
      <description>Description: VB6 function for returning the PC's name&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/9e3816f4-d99d-46e0-a025-2049606404c4.aspx'&gt;http://www.codekeep.net/snippets/9e3816f4-d99d-46e0-a025-2049606404c4.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Private Declare Function GetComputerName Lib &amp;quot;kernel32&amp;quot; Alias &amp;quot;GetComputerNameA&amp;quot; (ByVal lpBuffer As String, nSize As Long) As Long
''''

Public Function PCName() As String
    Static sPCName As String
    Dim lNameLength As Long
    Dim lResult As String
    If sPCName = &amp;quot;&amp;quot; Then
        sPCName = String(50, 32)
        lNameLength = 50
        lResult = GetComputerName(sPCName, lNameLength)
        sPCName = Left(Trim(sPCName), Len(Trim(sPCName)) - 1)
    End If
    PCName = sPCName
End Function
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/Z8xwHRnFTRw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/Z8xwHRnFTRw/9e3816f4-d99d-46e0-a025-2049606404c4.aspx</link>
      <pubDate>Thu, 08 Dec 2005 20:14:50 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/9e3816f4-d99d-46e0-a025-2049606404c4.aspx</feedburner:origLink></item>
    <item>
      <title>VB6 Pause Function</title>
      <description>Description: VB6 Pause Function&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/cba3985d-33d1-46d9-ae80-1a104991b07a.aspx'&gt;http://www.codekeep.net/snippets/cba3985d-33d1-46d9-ae80-1a104991b07a.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Public Sub Pause(ByVal Seconds As Long)
    Dim vStart As Variant
    vStart = Timer
    Do While Timer &amp;lt; vStart + Seconds
        If Timer - vStart &amp;lt; 0 Then
            Exit Sub
        End If
        DoEvents
    Loop
End Sub

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/6BrzQWupB4Q" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/6BrzQWupB4Q/cba3985d-33d1-46d9-ae80-1a104991b07a.aspx</link>
      <pubDate>Thu, 08 Dec 2005 20:13:28 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/cba3985d-33d1-46d9-ae80-1a104991b07a.aspx</feedburner:origLink></item>
    <item>
      <title>modExcel</title>
      <description>Description: Module for exporting ADO Recordsets to Excel&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/3e217dff-4b11-48c2-994c-e67fdcb9b623.aspx'&gt;http://www.codekeep.net/snippets/3e217dff-4b11-48c2-994c-e67fdcb9b623.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Option Explicit
Option Compare Text

Private Type ExlCell
    row As Long
    col As Long
End Type

Private Function GetExportToSheet(oExcel As Variant, Optional ByVal strToSheetName As String = &amp;quot;Export&amp;quot;, Optional ByVal strToBookName As String = &amp;quot;Export&amp;quot;) As Variant

    'Purpose:
    '       To return the Export To Worksheet
    '
    '   Input Parameters:
    '       oExcel           -
    '       strToBookName   -   Name of Excel Book to export to
    '
    '   Return Value:
    '       Newly created worksheet
    
    Dim oExportBook As Object
    Dim oToSheet As Variant
    Dim oBook As Variant
    
    On Error GoTo ErrorHandler
    
    'Find Export Book
    On Error Resume Next
    For Each oBook In oExcel.Workbooks
        Err.Clear
        If oBook.BuiltinDocumentProperties(&amp;quot;Title&amp;quot;) = strToBookName Then
            If Err.Number = 0 Then
                Set oExportBook = oBook
                Exit For
            End If
        End If
    Next
    Set oBook = Nothing
    
    On Error GoTo ErrorHandler
    
    'Create New Book/Get To Sheet
    If oExportBook Is Nothing Then
        Set oExportBook = oExcel.Workbooks.Add
        oExportBook.BuiltinDocumentProperties(&amp;quot;Title&amp;quot;) = strToBookName
        Set oToSheet = oExportBook.Sheets(1)
    Else
        Set oToSheet = oExportBook.Sheets.Add
    End If
    
    'Name To Sheet
    oToSheet.Name = strToSheetName &amp;amp; &amp;quot;(&amp;quot; &amp;amp; oExportBook.Sheets.Count &amp;amp; &amp;quot;)&amp;quot;
    
    'Return worksheet
ExitCode:
    Set GetExportToSheet = oToSheet
    Exit Function
    
ErrorHandler:
    'ErrorProc MOD_NAME &amp;amp; &amp;quot;.GetExportToSheet&amp;quot;, Err.Number, Err.Description
    MsgBox &amp;quot;Error ocurred: &amp;quot; &amp;amp; Err.Number &amp;amp; &amp;quot; - &amp;quot; &amp;amp; Err.Description
    Resume ExitCode
    
End Function

Public Sub ToExcel(ByVal rs As ADODB.Recordset, Optional ByVal strCaption As String = &amp;quot;Export&amp;quot;)
    
    Dim oExcel As Object
    Dim oSheet As Object ' OLE automation object
    Dim oField As ADODB.Field
    Dim strPasteData As String
    Dim strLastColumn As String
    Dim vntCursor As Variant
    
    'Get Excel
    On Error Resume Next
    Set oExcel = GetObject(, &amp;quot;Excel.Application&amp;quot;)
    ' If Excel is not launched start it
    If Err.Number = 429 Then
        Err.Clear
        Set oExcel = CreateObject(&amp;quot;Excel.Application&amp;quot;)
        If Err.Number = 429 Then
            MsgBox Err.Source &amp;amp; &amp;quot; &amp;quot; &amp;amp; Err.Number &amp;amp; &amp;quot; - &amp;quot; &amp;amp; Err.Description, vbExclamation + vbOKOnly
            Exit Sub
        End If

    End If
    
    'Get Sheet to Export To
    Set oSheet = GetExportToSheet(oExcel, strCaption)
    
    'Get Heading Row
    strPasteData = &amp;quot;&amp;quot;
    For Each oField In rs.Fields
        strPasteData = strPasteData &amp;amp; vbTab &amp;amp; oField.Name
    Next
    Set oField = Nothing
    
    'Get Data
    vntCursor = rs.Bookmark
    rs.MoveFirst
    strPasteData = strPasteData &amp;amp; vbCr &amp;amp; Replace(rs.GetString, vbCrLf, &amp;quot;  &amp;quot;)
    
    'Reset cursor
     rs.Bookmark = vntCursor
    
    'Paste Data
    ClearClipboard
    oSheet.Range(&amp;quot;A1&amp;quot;).Activate
    Clipboard.SetText Mid$(strPasteData, 2) 'Skip tab
    oSheet.Paste
    ClearClipboard
    
    'Format Sheet
    strLastColumn = Mid$(&amp;quot;ABCDEFGHIJKLMNOPQRSTUVWXYZ&amp;quot;, rs.Fields.Count, 1)
    oSheet.Range(&amp;quot;A1:&amp;quot; &amp;amp; strLastColumn &amp;amp; &amp;quot;1&amp;quot;).Font.Bold = True
    oSheet.Columns(&amp;quot;A:&amp;quot; &amp;amp; strLastColumn).AutoFit
    
    'Show Excel
    oExcel.Visible = True
    If oExcel.WindowState = vbMinimized Then
        oExcel.WindowState = vbNormal
    Else
        oExcel.WindowState = oExcel.WindowState
    End If
    oExcel.Visible = True
    oExcel.Interactive = True
    
    ' Clean up:
    Set oSheet = Nothing ' Remove object variable.
    Set oExcel = Nothing ' Remove object variable.
        
End Sub


&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/u-4mM9oIQDA" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/u-4mM9oIQDA/3e217dff-4b11-48c2-994c-e67fdcb9b623.aspx</link>
      <pubDate>Thu, 08 Dec 2005 20:11:34 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/3e217dff-4b11-48c2-994c-e67fdcb9b623.aspx</feedburner:origLink></item>
    <item>
      <title>ValidRS</title>
      <description>Description: Function for determining if a recordset is valid (contains records).&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/a4012785-9ad0-4566-a768-97b7cfe6deb1.aspx'&gt;http://www.codekeep.net/snippets/a4012785-9ad0-4566-a768-97b7cfe6deb1.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Public Function ValidRS(oRS As Recordset) As Boolean
    If oRS Is Nothing Then
        ValidRS = False
    ElseIf oRS.State &amp;lt;&amp;gt; adStateOpen Then
        ValidRS = False
    ElseIf oRS.BOF And oRS.EOF Then
        ValidRS = False
    ElseIf oRS.RecordCount = 0 Then
        ValidRS = False
    Else
        ValidRS = True
    End If
End Function

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/szwm3XyRxJw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/szwm3XyRxJw/a4012785-9ad0-4566-a768-97b7cfe6deb1.aspx</link>
      <pubDate>Thu, 08 Dec 2005 20:08:28 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/a4012785-9ad0-4566-a768-97b7cfe6deb1.aspx</feedburner:origLink></item>
    <item>
      <title>DebugRS</title>
      <description>Description: Dumps a recordset for debugging&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/3d8b6071-7fa1-4887-9700-463a83dd928a.aspx'&gt;http://www.codekeep.net/snippets/3d8b6071-7fa1-4887-9700-463a83dd928a.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Public Sub DebugRS(ByVal rs As ADODB.Recordset, Optional RowsToPrint As Long, Optional LogFile As String)
    Dim i As Long, j As Long
    Dim fso As Object
    Dim file As Object
    Const ioModeForWriting As Integer = 1
    Const ioModeForAppending As Integer = 8
    
    Dim oRS As ADODB.Recordset
    Set oRS = rs.Clone
    oRS.Filter = rs.Filter

    If LogFile &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then
        Set fso = CreateObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)
        Set file = fso.OpenTextFile(LogFile, ioModeForAppending, True)
        file.WriteBlankLines 2
        file.WriteLine String(25, &amp;quot;*&amp;quot;) &amp;amp; &amp;quot;  &amp;quot; &amp;amp; Format(Now, &amp;quot;dd-mmm-yyyy hh:mm:ss AM/PM&amp;quot;) &amp;amp; &amp;quot;  &amp;quot; &amp;amp; String(25, &amp;quot;*&amp;quot;)
        file.WriteLine &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;  Source   &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;quot;
        file.Write oRS.Source
        file.WriteBlankLines 1
        file.WriteLine &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;  Filter: &amp;quot; &amp;amp; oRS.Filter
    End If

    If ValidRS(oRS) Then
        Do While Not oRS.EOF
            j = j + 1
            If file Is Nothing Then
                Debug.Print &amp;quot;&amp;quot;
                Debug.Print &amp;quot;====== Record &amp;quot; &amp;amp; CStr(oRS.Bookmark) &amp;amp; &amp;quot; ========================================&amp;quot;
            Else
                file.WriteBlankLines 1
                file.WriteLine &amp;quot;====== Record &amp;quot; &amp;amp; CStr(oRS.Bookmark) &amp;amp; &amp;quot; ========================================&amp;quot;
            End If
            For i = 0 To oRS.Fields.Count - 1
                If file Is Nothing Then
                    Debug.Print &amp;quot;(&amp;quot; &amp;amp; CStr(i) &amp;amp; &amp;quot;) &amp;quot; &amp;amp; oRS.Fields(i).Name &amp;amp; &amp;quot; = &amp;quot; &amp;amp; CStr(oRS.Fields(i).Value &amp;amp; &amp;quot;&amp;quot;)
                Else
                    file.WriteLine &amp;quot;(&amp;quot; &amp;amp; CStr(i) &amp;amp; &amp;quot;) &amp;quot; &amp;amp; oRS.Fields(i).Name &amp;amp; &amp;quot; = &amp;quot; &amp;amp; CStr(oRS.Fields(i).Value &amp;amp; &amp;quot;&amp;quot;)
                End If
                DoEvents
            Next
            oRS.MoveNext
            DoEvents
            If j = RowsToPrint Then
                Exit Do
            End If
        Loop
    End If

    If Not file Is Nothing Then
        file.WriteBlankLines 1
        file.WriteLine &amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EOF &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;  RecordCount = &amp;quot; &amp;amp; oRS.RecordCount &amp;amp; &amp;quot;  &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;quot;
        file.Close
        Set file = Nothing
        Set fso = Nothing
        Debug.Print &amp;quot;done.&amp;quot;
    End If
    Set oRS = Nothing
End Sub
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/CD4fOzYtN2o" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/CD4fOzYtN2o/3d8b6071-7fa1-4887-9700-463a83dd928a.aspx</link>
      <pubDate>Thu, 08 Dec 2005 20:06:56 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/3d8b6071-7fa1-4887-9700-463a83dd928a.aspx</feedburner:origLink></item>
    <item>
      <title>VB6 modAspectRatio</title>
      <description>Description: Module for maintaining a form's aspect ratio&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/0905b038-ffc3-479a-9e22-62ad969ac418.aspx'&gt;http://www.codekeep.net/snippets/0905b038-ffc3-479a-9e22-62ad969ac418.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Option Explicit

' ***********************************************************
' Subclassing.
'   Maintaining Form Aspect Ratio During Resize
'   http://www.vb-helper.com/howto_keep_form_aspect_ratio.html
' ***********************************************************

Public OldWindowProc As Long
Declare Function CallWindowProc Lib &amp;quot;USER32&amp;quot; Alias &amp;quot;CallWindowProcA&amp;quot; (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, lParam As WINDOWPOS) As Long
Declare Function SetWindowLong Lib &amp;quot;USER32&amp;quot; Alias &amp;quot;SetWindowLongA&amp;quot; (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Const GWL_WNDPROC = (-4)

Type WINDOWPOS
    hWnd As Long
    hWndInsertAfter As Long
    x As Long
    Y As Long
    cx As Long
    cy As Long
    FLAGS As Long
End Type
Public Const WM_WINDOWPOSCHANGING = &amp;amp;H46
Public Const WM_WINDOWPOSCHANGED = &amp;amp;H47

' Process messages.
Public Function NewWindowProc(ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, lParam As WINDOWPOS) As Long
Static done_before As Boolean
Static aspect As Single
Dim new_aspect As Single

    ' Keep the aspect ratio.
    If msg = WM_WINDOWPOSCHANGING Then
        If lParam.cy &amp;gt; 0 Then
            ' Save the aspect ratio the first.
            If Not done_before Then
                aspect = lParam.cx / lParam.cy
                done_before = True
            End If
            
            new_aspect = lParam.cx / lParam.cy
            If new_aspect &amp;gt; aspect Then
                ' Too short/wide. Make it taller.
                lParam.cy = lParam.cx / aspect
            Else
                ' Too tall/thin. Make it wider.
                lParam.cx = aspect * lParam.cy
            End If
        End If
    End If

    ' Continue normal processing. VERY IMPORTANT!
    NewWindowProc = CallWindowProc(OldWindowProc, hWnd, msg, wParam, lParam)
End Function


&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/pP_Vy34PRCM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/pP_Vy34PRCM/0905b038-ffc3-479a-9e22-62ad969ac418.aspx</link>
      <pubDate>Thu, 08 Dec 2005 13:46:36 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/0905b038-ffc3-479a-9e22-62ad969ac418.aspx</feedburner:origLink></item>
    <item>
      <title>VB6 modScreenAPI</title>
      <description>Description: Module of Common Routines for Screen Captures&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/2f754cc0-2e09-47d9-b7ef-204e9332de50.aspx'&gt;http://www.codekeep.net/snippets/2f754cc0-2e09-47d9-b7ef-204e9332de50.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Option Explicit
Option Base 0
 '--------------------------------------------------------------------
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 '
 ' Visual Basic 4.0 16/32 Capture Routines
 '
 ' This module contains several routines for capturing windows into a
 ' picture.  All the routines work on both 16 and 32 bit Windows
 ' platforms.
 ' The routines also have palette support.
 '
 ' CreateBitmapPicture - Creates a picture object from a bitmap and
 ' palette.
 ' CaptureWindow - Captures any window given a window handle.
 ' CaptureActiveWindow - Captures the active window on the desktop.
 ' CaptureForm - Captures the entire form.
 ' CaptureClient - Captures the client area of a form.
 ' CaptureScreen - Captures the entire screen.
 ' PrintPictureToFitPage - prints any picture as big as possible on
 ' the page.
 '
 ' NOTES
 '    - No error trapping is included in these routines.
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

 Private Type PALETTEENTRY
    peRed As Byte
    peGreen As Byte
    peBlue As Byte
    peFlags As Byte
 End Type

 Private Type LOGPALETTE
    palVersion As Integer
    palNumEntries As Integer
    palPalEntry(255) As PALETTEENTRY  ' Enough for 256 colors.
 End Type

 Private Type GUID
    Data1 As Long
    Data2 As Integer
    Data3 As Integer
    Data4(7) As Byte
 End Type

Private Const RASTERCAPS As Long = 38
Private Const RC_PALETTE As Long = &amp;amp;H100
Private Const SIZEPALETTE As Long = 104

Private Type RECT
   Left As Long
   Top As Long
   Right As Long
   Bottom As Long
End Type

Private Declare Function CreateCompatibleDC Lib &amp;quot;GDI32&amp;quot; (ByVal hDC As Long) As Long
Private Declare Function CreateCompatibleBitmap Lib &amp;quot;GDI32&amp;quot; (ByVal hDC As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private Declare Function GetDeviceCaps Lib &amp;quot;GDI32&amp;quot; (ByVal hDC As Long, ByVal iCapabilitiy As Long) As Long
Private Declare Function GetSystemPaletteEntries Lib &amp;quot;GDI32&amp;quot; (ByVal hDC As Long, ByVal wStartIndex As Long, ByVal wNumEntries As Long, lpPaletteEntries As PALETTEENTRY) As Long
Private Declare Function CreatePalette Lib &amp;quot;GDI32&amp;quot; (lpLogPalette As LOGPALETTE) As Long
Private Declare Function SelectObject Lib &amp;quot;GDI32&amp;quot; (ByVal hDC As Long, ByVal hObject As Long) As Long
Private Declare Function BitBlt Lib &amp;quot;GDI32&amp;quot; (ByVal hDCDest As Long, ByVal XDest As Long, ByVal YDest As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hDCSrc As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal dwRop As Long) As Long
Private Declare Function DeleteDC Lib &amp;quot;GDI32&amp;quot; (ByVal hDC As Long) As Long
Private Declare Function GetForegroundWindow Lib &amp;quot;USER32&amp;quot; () As Long
Private Declare Function SelectPalette Lib &amp;quot;GDI32&amp;quot; (ByVal hDC As Long, ByVal hPalette As Long, ByVal bForceBackground As Long) As Long
Private Declare Function RealizePalette Lib &amp;quot;GDI32&amp;quot; (ByVal hDC As Long) As Long
Private Declare Function GetWindowDC Lib &amp;quot;USER32&amp;quot; (ByVal hWnd As Long) As Long
Private Declare Function GetDC Lib &amp;quot;USER32&amp;quot; (ByVal hWnd As Long) As Long
Private Declare Function GetWindowRect Lib &amp;quot;USER32&amp;quot; (ByVal hWnd As Long, lpRect As RECT) As Long
Private Declare Function ReleaseDC Lib &amp;quot;USER32&amp;quot; (ByVal hWnd As Long, ByVal hDC As Long) As Long
Private Declare Function GetDesktopWindow Lib &amp;quot;USER32&amp;quot; () As Long

Private Type PicBmp
   Size As Long
   Type As Long
   hBmp As Long
   hPal As Long
   Reserved As Long
End Type

Private Declare Function OleCreatePictureIndirect Lib &amp;quot;olepro32.dll&amp;quot; (PicDesc As PicBmp, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As Long

 
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 '
 ' CreateBitmapPicture
 '    - Creates a bitmap type Picture object from a bitmap and palette.
 '
 ' hBmp
 '    - Handle to a bitmap.
 '
 ' hPal
 '    - Handle to a Palette.
 '    - Can be null if the bitmap doesn't use a palette.
 '
 ' Returns
 '    - &lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/GRYffvoyGMw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/GRYffvoyGMw/2f754cc0-2e09-47d9-b7ef-204e9332de50.aspx</link>
      <pubDate>Thu, 08 Dec 2005 13:45:23 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/2f754cc0-2e09-47d9-b7ef-204e9332de50.aspx</feedburner:origLink></item>
    <item>
      <title>IsCompiledEXE</title>
      <description>Description: Check if application is being run in VB6 or compiled EXE.&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/7f8af69f-afdb-4e4b-bc82-1969cdf66d9e.aspx'&gt;http://www.codekeep.net/snippets/7f8af69f-afdb-4e4b-bc82-1969cdf66d9e.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Private Function IsCompiledEXE() As Boolean
'===============================================================================
  On Error Resume Next
  Debug.Print 0 / 0
  If Err.Number = 0 Then IsCompiledEXE = True
End Function&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/sxZ4hAzPRCE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/sxZ4hAzPRCE/7f8af69f-afdb-4e4b-bc82-1969cdf66d9e.aspx</link>
      <pubDate>Thu, 01 Dec 2005 10:48:29 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/7f8af69f-afdb-4e4b-bc82-1969cdf66d9e.aspx</feedburner:origLink></item>
    <item>
      <title>Returns a files content</title>
      <description>Description: Returns the contents of a file&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/48e3db65-1924-4762-8164-fab427cc373c.aspx'&gt;http://www.codekeep.net/snippets/48e3db65-1924-4762-8164-fab427cc373c.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Public Function FileToString(ByVal sFileName As String) As String
Dim lFreeFile As Long
Dim sFileContents As String
  
On Error GoTo errRtn
   sFileContents = &amp;quot;&amp;quot;
   lFreeFile = FreeFile
   Open sFileName For Binary As #lFreeFile
   sFileContents = Input(LOF(lFreeFile), lFreeFile)
   Close lFreeFile
   FileToString = sFileContents
Exit Function
errRtn:
   Err.Clear
   FileToString = &amp;quot;&amp;quot;
End Function&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/i9Jb3KROPCs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/i9Jb3KROPCs/48e3db65-1924-4762-8164-fab427cc373c.aspx</link>
      <pubDate>Mon, 12 Sep 2005 12:16:26 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/48e3db65-1924-4762-8164-fab427cc373c.aspx</feedburner:origLink></item>
    <item>
      <title>Insert checkboxes to Excel grid</title>
      <description>Description: Create checkbozes inside cells in excel&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/ea4bb68a-a0f7-43bf-a986-d64719dee753.aspx'&gt;http://www.codekeep.net/snippets/ea4bb68a-a0f7-43bf-a986-d64719dee753.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;
Sub loadCBX()

    Dim myCell As Range
    Dim myCBX As CheckBox
    Dim rng As Range
        
    shtPivotConfig.CheckBoxes.Delete  'nice for testing!
    Set rng = shtPivotConfig.Range(&amp;quot;config.CategorySorting&amp;quot;)
    
    For Each myCell In rng
        With myCell
            .NumberFormat = &amp;quot;;;;&amp;quot;
            .Locked = False
            Set myCBX = shtPivotConfig.CheckBoxes.Add _
                    (Top:=.Top, Width:=.Width, _
                     Height:=.Height, Left:=.Left)
        End With
        With myCBX
            .Name = &amp;quot;cbx_&amp;quot; &amp;amp; myCell.Address(0, 0)
            .LinkedCell = myCell.Address(external:=True)
            .Caption = &amp;quot;&amp;quot;
            .Placement = xlMoveAndSize
            '.OnAction = ThisWorkbook.Name &amp;amp; &amp;quot;!dothework&amp;quot;
        End With
    Next myCell


End Sub

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepVB6/~4/LShlBEg9bO8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepVB6/~3/LShlBEg9bO8/ea4bb68a-a0f7-43bf-a986-d64719dee753.aspx</link>
      <pubDate>Tue, 23 Aug 2005 00:50:50 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/ea4bb68a-a0f7-43bf-a986-d64719dee753.aspx</feedburner:origLink></item>
  </channel>
</rss>
