954,558 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

copying Msflexgrid row and column data to excel

Hi,

any idea how to copy row and column data from msflexgrid to excel, I have tried looping from the selected rows and columns of msflexgrid using "VbTab" and "vbCrLf" and clipboard.setText, "vbCrLf" seems to work in separating the data into rows but data to column seems to have some problem

i have also tried using msflegrid.clip but i'm still coming up with similar results.. data to row is ok, but data to column is not

my Code:
Dim tmpCnt As String
Clipboard.Clear
tmpCnt = "a" & vbTab & "b" & vbCrLf & _
"c" & vbTab & "d" & vbCrLf & _
"1" & vbTab & "2"
Call Clipboard.SetText(tmpCnt)

thanks

ariesL
Newbie Poster
6 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 

Hi,

I found out that there is nothing wrong with the code, I tried "paste" to text document and notice that the "Tab" was still present

when I checked the sheet where I want to paste the clipboard the delimiter filter was set to comma, so I assume that this is the reason why my TAB was not working... I change the "VbTab" to Chr(44) then it works

but still I need other confirmation about this or better solution

thanks

ariesL
Newbie Poster
6 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 

Need to set text on Clipboard?
In each loop assign the value to the the cells...
That may do your need...

paramasivan
Posting Virtuoso
1,516 posts since Feb 2007
Reputation Points: 46
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You