Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Remove Spaces

In a routine i have tmpName that is a temporary workbook name that is used
in the routine to open other workbooks. I need to remove spaces in the
tmpName. Ex. -WorkBook Name = Test One Two.xls - I need the tmpName to be
"TestOneTwo.xls. How do I remove the spaces?

Any help is truly appreciated.

Regards,
Ronbo
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Remove Spaces

Google for excel Selection.Replace does this help?

hth Pete
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Remove Spaces

Use the Replace function:
tmpName = Replace(Application.ActiveWorkbook.Name," ","",1)

-Glenn Ray


"Ronbo" wrote:

In a routine i have tmpName that is a temporary workbook name that is used
in the routine to open other workbooks. I need to remove spaces in the
tmpName. Ex. -WorkBook Name = Test One Two.xls - I need the tmpName to be
"TestOneTwo.xls. How do I remove the spaces?

Any help is truly appreciated.

Regards,
Ronbo

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Remove Spaces

Thanks, it works but I have more to the code and have not been able to get it
to work for me. I have to quit now and will not be back at the problem until
tomorrow night or or in the next day or two.

Does anyone know, should I reply to this old thead (and if so will anyone
see it?) or should I start a new question?

"Glenn Ray" wrote:

Use the Replace function:
tmpName = Replace(Application.ActiveWorkbook.Name," ","",1)

-Glenn Ray


"Ronbo" wrote:

In a routine i have tmpName that is a temporary workbook name that is used
in the routine to open other workbooks. I need to remove spaces in the
tmpName. Ex. -WorkBook Name = Test One Two.xls - I need the tmpName to be
"TestOneTwo.xls. How do I remove the spaces?

Any help is truly appreciated.

Regards,
Ronbo

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i remove spaces? Lion2004 Excel Discussion (Misc queries) 1 March 9th 07 11:57 AM
how do I remove leading spaces and leave the remianing spaces w Debi Excel Worksheet Functions 6 February 28th 07 03:29 PM
remove trailing spaces les8 Excel Discussion (Misc queries) 4 January 20th 06 03:55 PM
How do I remove spaces lovebaby Excel Discussion (Misc queries) 5 October 29th 05 02:08 PM
Remove spaces Soniya Excel Programming 2 May 19th 04 12:54 PM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"