I'm not exactly sure what you're doing, but this works for me:
<font face=Tahoma><SPAN style="color:#00007F">Sub</SPAN> test()
<SPAN style="color:#00007F">Dim</SPAN> monthenddate <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>, monthendname <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>
monthenddate = "6-30-05"
monthendname = Replace(monthenddate, "-", "")
MsgBox monthendname
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>