Thread: ADD SPACES
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ronbo Ronbo is offline
external usenet poster
 
Posts: 162
Default ADD SPACES

I need to add spaces in a tempory name. What I have been trying without any
luck is;

tmpName2 = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 11)
tmpName2 = Left(tmpName2, Len(tmpName2) - 13 & " " & -11 & " " - 8 & " " &
-2 & " ").

What I need for it to do is to subtract the last 11 characters in the active
workbook name and then add spaces in the 13th,11th, 8th and 2nd spaces so
that;

12345678901213141516171819292122;

would become
123456789012131415161;

then
12345678 90 121 314151 61;

It does not work. Any help is truly apprectiate.