codehutch.com

Online Code Repository

Export DataTable To Excel (VB .NET)

I was digging through my files when I found this subroutine and I thought, maybe somebody out there might need it. It’s not my original code though (and I forgot where I got it). Anyhow, I just wanted to share it and here it is:
Public Sub ExportToExcel()
Dim table as Datatable = “Query your datatable here”
Dim [...]

Timer in VB .Net

A simple timer class written in VB .Net
Imports System.Timers
Public Class TestTimer
Shared _timer As New Timer()
Dim _timerInterval As Integer = 10000 ‘in millisecconds
Public Sub New()
Initialize()
End Sub
Public Sub Initialize()
AddHandler _timer.Elapsed, AddressOf _timer_Elapsed
_timer.Interval = _timerInterval
End Sub
Public Sub _timer_Elapsed(ByVal sender As Object, ByVal e As ElapsedEventArgs)
‘As long as timer is ‘enabled’ this function will be triggered every time interval [...]

  

Calendar

September 2010
M T W T F S S
« Sep    
 12345
6789101112
13141516171819
20212223242526
27282930  

Locations of visitors to this page

Page Rank