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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy array to clipboard

Status
Not open for further replies.

steven54

Programmer
Jul 4, 2009
22
0
0
US
I am looking for a way to copy a single dimension text array of less than a dozen elements to the clipboard so when pasting the data into an Excel spreadsheet the data is inserted into a column, not a row.

This copies the data into an array. However, when pasting the data into Excel it pastes it horizontally (a row) rather than vertically (a column).

tempString = ""
For i as integer = 0 to 5
tempString = tempString & txtMyDataBox.Text & ControlChars.Tab
Next

Any ideas?

Thanks in advance! [smile]

When a door closes another door should open, but if it doesn't then go in through the window.
 
I resolved it with this little chunk of code:

tempString = ""
For i as integer = 0 to 5
tempString = tempString & txtMyDataBox.Text & ControlChars.CrLf
Next

Sometimes the solution is too simple and, thus, easily overlooked [shadeshappy]

When a door closes another door should open, but if it doesn't then go in through the window.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top