Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Drederick

  1. Drederick

    Prevent leaving cell blank (empty)

    Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim curr_row As Long, curr_col As Long, prev_row As Long curr_row = Selection.Row curr_col = Selection.Column prev_row = curr_row - 1 If prev_row > 0 And curr_col = 1 Then If Trim(Cells(prev_row, 1)) = "" Then...
  2. Drederick

    row number of any cell that contains a certain word

    Sub list_rows() Dim search As String, i As Integer, j As Integer search = "world" j = 1 Range("B:B").EntireColumn.Clear For i = 1 To 1000 If InStr(1, UCase(Range("A" & i)), UCase(search)) > 0 Then Range("B" & j) = i j = j + 1 End If...
  3. Drederick

    How to programmatically burn a CD within a VB app?

    http://www.goldenhawk.com/
  4. Drederick

    using RegExp to catch an issue

    ' Input.txt contains ' ' "aaa","bbbb","cccccc","","ggg" ' "aaa","bbbb","cccccc","","ggg" ' "aaa","bbbb","cccccc","","ggg" ' "aaa","bbbb","cccc"cc","","ggg" ' "aaa","bbb""b","cccccc","","ggg" ' aaa","bbbb","cccccc","","ggg" ' "aaa,"bbbb","cccccc","","ggg" ' aaa, "bbbb", "cccccc", "", "ggg"...
  5. Drederick

    Help with splitting a string (more complex than the Split function)

    Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim line As String = "", line_80 As String = "", line_rest As String = "", pos As Integer line = "I have a string variable that will usually be...
  6. Drederick

    regex help

    'Revised ElseIf block ElseIf more_addresses Then address = re.Replace(line, "$2") ' Trailing comma indicating more addresses If Regex.IsMatch(line, ".*,\s*$") Then more_addresses = True Else...
  7. Drederick

    regex help

    It's not a one-liner, but it seems to work. Imports System.Text.RegularExpressions Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim line As String = "", from_to_cc As String = "", address As String =...
  8. Drederick

    regex help

    Can you post a dummy email header with multiple addresses? I need to look at the format.
  9. Drederick

    group box radio button event

    ' Stole Rick and Tip's code ;) Public Class Form1 Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radFahrenheit.Click, _...
  10. Drederick

    List of Files in ComboBox

    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q305201&ID=kb;en-us;Q305201&SD=MSDN ' Add the following controls: ' ComboBox1 ' Button1 ' FolderBrowserDialog1 Public Class Form1 Dim dir_path As String = "" Private Sub Button1_Click(ByVal sender As System.Object, ByVal...
  11. Drederick

    List of Files in ComboBox

    ' Add the following controls: ' ComboBox1 ' Button1 ' FolderBrowserDialog1 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim dir_path As String = "", file_name As String = ""...
  12. Drederick

    Reading file lne by line

    Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim file_name As String = "C:\Documents and Settings\Admin\Desktop\Input.txt" Dim line As String = "", app_name As String = "" FileOpen(1...
  13. Drederick

    Regex format problem

    Imports System.Text.RegularExpressions Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim chekme As String = "999999999999" Dim re As New Regex("(\d{5})(\d{2})(\d{3})(\d{2})") chekme =...
  14. Drederick

    Number Generator?

    Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim file_path As String = App_Path() & "\Counter.txt" ' Counter File Dim objFileInfo As New FileInfo(file_path), num As Integer =...
  15. Drederick

    dockable form

    Public Class Form1 Private Sub Form1_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged If Me.Left < Screen.PrimaryScreen.Bounds.Width / 2 Then Me.Left = 0 Else Me.Left = Screen.PrimaryScreen.Bounds.Width -...

Part and Inventory Search

Back
Top