View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob Bovey Rob Bovey is offline
external usenet poster
 
Posts: 811
Default Generating spaces in code

"ExcelMonkey" wrote in message
...
How do you insert spaces into a Debug.Print stmt via code. That is, I can
manualy put spaces into a text string by manually using the space bar (See
Below - 6 spaces). How would I do this via code? Do I have to use a Loop
with a space character?

Debug.Print "Hello " & TextVariable & " :"


If I understand what you're trying to do you can use the VBA Space
function. Space(6) will give you six space characters.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm