Remove Character

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
 
M

Michel Walsh

HI,


Replace( myStringVar, ":", vbNullString)



Hoping it may help,
Vanderghast, Access MVP
 
K

Kenneth H. Young

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top