User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 427,314 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,846 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 3169 | Replies: 2
Reply
Join Date: Mar 2007
Posts: 4
Reputation: ariesL is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ariesL ariesL is offline Offline
Newbie Poster

Help copying Msflexgrid row and column data to excel

  #1  
Mar 5th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2007
Posts: 4
Reputation: ariesL is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ariesL ariesL is offline Offline
Newbie Poster

Re: copying Msflexgrid row and column data to excel

  #2  
Mar 6th, 2007
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
Reply With Quote  
Join Date: Feb 2007
Posts: 1,511
Reputation: paramasivan is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
paramasivan's Avatar
paramasivan paramasivan is offline Offline
Posting Virtuoso

Re: copying Msflexgrid row and column data to excel

  #3  
Mar 6th, 2007
Need to set text on Clipboard?
In each loop assign the value to the the cells...
That may do your need...
CHEERIO,
Paramasivan S.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 2:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC