Jump to content
Macro Express Forums

Need To Remove Extra Spaces


Zarious
 Share

Recommended Posts

I have a string variable that has extra spaces on the end. I need to cut those extra spaces off of the end of the string, but not effect the spaces between the words. Here's an example of what I mean, where the underlines ___ represent the spaces I need to remove.

 

Lastname, Firstname__________
A Business Name______________

 

I am capturing this information from the windows title (trust me it's the only way I can get it :( ) and it seems that the title is always 40 characters long, with extra spaces being added at the end of the information to make it be 40 characters. I've somehow got to get ME to delete everything from character 40, back to the last letter it encounters. Any ideas on how to do this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...