Remove Character

  • Thread starter Thread starter Kenneth H. Young
  • Start date Start date
K

Kenneth H. Young

How do I remove the : from a MAC address as such aa:aa:aa:aa:aa:aa to
aaaaaaaaaaaa?

Private Sub cmdMP_Click()
Dim MAC2 As String
MAC2 = Me.HardwareAddress
MsgBox "The MAC is " & MAC2, vbOKOnly, "Hardware Address"
End Sub
 
HI,


Replace( myStringVar, ":", vbNullString)



Hoping it may help,
Vanderghast, Access MVP
 
Worked perfectly...Thanks!

Private Sub cmdMP_Click()
Dim MAC2, MAC3 As String
MAC2 = Me.HardwareAddress
MAC3 = Replace(MAC2, ":", vbNullString)
MsgBox "The MAC is " & MAC3, vbOKOnly, "Hardware Address"
End Sub
 
Back
Top