Click here to Skip to main content
15,923,168 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: convert excel to mdf file Pin
Wooster200618-Aug-06 7:49
Wooster200618-Aug-06 7:49 
GeneralRe: convert excel to mdf file Pin
Christian Graus18-Aug-06 12:13
protectorChristian Graus18-Aug-06 12:13 
GeneralRe: convert excel to mdf file Pin
playout20-Aug-06 4:00
playout20-Aug-06 4:00 
GeneralRe: convert excel to mdf file Pin
Christian Graus20-Aug-06 10:57
protectorChristian Graus20-Aug-06 10:57 
GeneralRe: convert excel to mdf file Pin
playout20-Aug-06 3:55
playout20-Aug-06 3:55 
QuestionUnexpected error (50003) in vb6.0 Pin
vijaykumarp18-Aug-06 0:54
vijaykumarp18-Aug-06 0:54 
QuestionHelp me , Please :(( Pin
Hussein Madani Ghomi18-Aug-06 0:05
Hussein Madani Ghomi18-Aug-06 0:05 
AnswerRe: Help me , Please :(( Pin
coolestCoder18-Aug-06 0:28
coolestCoder18-Aug-06 0:28 
AnswerRe: Filling listbox on other page Pin
Guffa18-Aug-06 0:31
Guffa18-Aug-06 0:31 
AnswerRe: Help me , Please :(( Pin
FeRtoll18-Aug-06 13:43
FeRtoll18-Aug-06 13:43 
QuestionConnecting to UniSQL Database Pin
alien viper17-Aug-06 22:17
alien viper17-Aug-06 22:17 
Question.NET Pin
rahulnair17-Aug-06 21:43
rahulnair17-Aug-06 21:43 
AnswerRe: .NET Pin
Guffa17-Aug-06 22:14
Guffa17-Aug-06 22:14 
AnswerRe: .NET Pin
Christian Graus18-Aug-06 1:31
protectorChristian Graus18-Aug-06 1:31 
QuestionSMS Application Pin
Sathish_b8117-Aug-06 21:08
Sathish_b8117-Aug-06 21:08 
AnswerRe: SMS Application Pin
Coding C#18-Aug-06 1:56
Coding C#18-Aug-06 1:56 
GeneralRe: SMS Application Pin
FeRtoll18-Aug-06 13:44
FeRtoll18-Aug-06 13:44 
Question[Message Deleted] Pin
PREMSONBABY17-Aug-06 20:26
PREMSONBABY17-Aug-06 20:26 
AnswerRe: windows service Pin
Dave Sexton18-Aug-06 0:10
Dave Sexton18-Aug-06 0:10 
QuestionStrip out invalid characters from xml files [modified] Pin
Icharus17-Aug-06 17:10
Icharus17-Aug-06 17:10 
AnswerRe: Strip out invalid characters from xml files Pin
Christian Graus17-Aug-06 19:30
protectorChristian Graus17-Aug-06 19:30 
AnswerRe: Strip out invalid characters from xml files Pin
Guffa17-Aug-06 22:19
Guffa17-Aug-06 22:19 
AnswerRe: Strip out invalid characters from xml files Pin
Icharus18-Aug-06 8:05
Icharus18-Aug-06 8:05 
Thanks to Christian and Guffa.
Below is the solution I was able to come up with...

Public Structure HexReplacement
   Public HexCharacter As Char
   Public Replacement As String
End Structure

Public Shared Function ConvertHexToChar(ByVal hexValue As String) As Char
   Dim convertedChar As Char = Nothing
   Try
       convertedChar = Chr(Int32.Parse(hexValue, Globalization.NumberStyles.HexNumber))
   Catch ex As FormatException
       ' Error handling here....
   Catch ex As ArgumentException
       ' Error handling here....
   End Try
   Return convertedChar
End Function

Public Function CleanOutHexValues(ByVal dirtyString As String, ByVal hexReplacements As HexReplacement()) As String
   Dim cleanString As String = dirtyString
   For Each hr As HexReplacement In hexReplacements
       cleanString = cleanString.Replace(hr.HexCharacter, hr.Replacement)
   Next
   Return cleanString
End Function

Public Sub TestHexCharCleanUp()
   Dim hr(1) As HexReplacement
   hr(0).HexCharacter = ConvertHexToChar("0b") ' "0b" =  or single space.
   hr(0).Replacement = ""
   Dim dirtyString As String = "Testing the removal of  "
   MsgBox(CleanOutHexValues(dirtyString, hr))
End Sub


Comments will be greatly appreciated. Smile | :)
QuestionProgress Bar & ForeColor Pin
John Waclawski17-Aug-06 16:42
John Waclawski17-Aug-06 16:42 
AnswerRe: Progress Bar & ForeColor Pin
NGENEAR1118-Aug-06 16:32
NGENEAR1118-Aug-06 16:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.