Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA: Copy range into DOS system

Status
Not open for further replies.

trickshot1126

Technical User
Feb 5, 2015
26
US
Hello and happy Friday!

I have an excel document that the user inputs information. The information will ultimately be pasted into a dos based system that keeps records of all notes for each person.

The dos system note size is limited to 1,035 characters or 69 spaces left to right and 15 lines. What i am looking to do is use VBA code to copy the range of cells, remove all line breaks and the output would fit into the given area.

I currently use code that i can paste into the dos based system but there is a lot of unused space due to line breaks limiting the information i can move at one time.

Any help would be greatly appreciated. If i did not explain this well enough please let me know and i will attempt to explain further.

Thanks!
 
sorry. [blush]

change this...
Code:
sPaste = sPaste & Mid(sTemp, i, MAXCHR) & vbNewLine

But hey, does it matter? Look how your terminal emulator wrapped line 2 and following!!!

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top