View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Named range by VBA to another workbook


Sub FillInTheBlanks()
Dim str As String
str = "abc xyz"
str = Application.Substitute(str, " ", "_")
MsgBox str
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Madiya"
wrote in message
Hi Jim,
Got the error.
The name is not valid (name should not contain any blank cherecter).
Is there any way I can convert any text in cell containing space to
"_"
For example, say I have a text "abc xyz" which should get converted in
"abc_xyz"
Regards,
Madiya