Hey Some
Thank you, I sort of get the code you have posted but I was trying something alittle more simpler like this:
Dim SearchString As String, SearchChar As String, NewSearchChar As String
SearchString = "CMB*****L" ' String to search in.
SearchChar = "L" ' Search for Character
NewSearchChar = "R" ' Replace with New Character
For Each Ctrl In Userform1.Controls
If TypeOf Ctrl Is CommandButton Then
If InStr(1, SearchString, SearchChar) Then
Replace(SearchString, SearchChar, NewSearchChar) As String
End If
End If
Next Ctrl
I am able to grab all of the command buttons and if I just use the Instr function; it is returning all command buttons with this search string
however, I can not get the replace function to work. Can somebody please tell me where I am going wrong?
CM may very well be right in that the names are read only, still I am curious to see if this will work
Thank you,
Mark