|
-
Dec 19th, 2007, 06:39 PM
#1
Thread Starter
Addicted Member
MSflexgrid question
Hi,
How can i export the contents of a MSflexgrid to a richtextbox?
Please advise.
Many Thanks
-
Dec 19th, 2007, 07:20 PM
#2
Re: MSflexgrid question
Would this work for you?
Code:
Private Sub Command12_Click()
With MSHFlexGrid1
.Col = 0
.Row = 0
.ColSel = .Cols - 1
.RowSel = .Rows - 1
Clipboard.Clear
Clipboard.SetText .Clip, vbCFRTF
.ColSel = 0
.RowSel = 0
End With
RichTextBox1.TextRTF = Clipboard.GetText(vbCFRTF)
End Sub
-
Dec 20th, 2007, 05:26 AM
#3
Thread Starter
Addicted Member
Re: MSflexgrid question
Hi Mate,
Thanks for reply,
unfortunately that did not work. The richtextbox remained blank
-
Dec 20th, 2007, 06:37 AM
#4
Re: MSflexgrid question
I think that the Clip property is only available for the MSHFlexGrid.
-
Dec 20th, 2007, 07:21 AM
#5
Thread Starter
Addicted Member
Re: MSflexgrid question
just had a look for the MSHflexgrid control within Project - Components and cannot find it. I have VB6 which is fully updated.
-
Dec 20th, 2007, 07:39 AM
#6
Frenzied Member
Re: MSflexgrid question
The name to look for is Microsoft Hierarchial FlexGrid Control 6.0 (SP4) the ocx name is MSHFLXGD.OCX
-
Dec 20th, 2007, 07:55 AM
#7
Thread Starter
Addicted Member
Re: MSflexgrid question
found it, thanks.
However, i am using a DOA data control which is not valid for a MSHflexgrid.
so i'm still looking for a solution to my original question
thanks
-
Dec 20th, 2007, 08:04 AM
#8
Re: MSflexgrid question
I'm guessing you meant DAO data control.
I think if you moved to the new technology of ADO, you would have better results.
-
Dec 20th, 2007, 09:38 AM
#9
Thread Starter
Addicted Member
Re: MSflexgrid question
Hi Hack,
yes i mean DAO. The program was written several years ago, when DAO was all the rage. If i was to do the program again now, i would definately use ADO. I am not a programmer by trade and the program was something i wrote to make my life a bit easier in my Job. I havent got the time to redo it. Anyway, it works perfectly fine as is.
Any help with my current problem will be most appreciated.
-
Dec 20th, 2007, 09:52 AM
#10
Re: MSflexgrid question
 Originally Posted by Joacim Andersson
I think that the Clip property is only available for the MSHFlexGrid.
No, it is avalable for either flexgrid - incidentally at the time of posting I was doing something with the hierarchical grid so it came handy.
-
Dec 20th, 2007, 09:55 AM
#11
Frenzied Member
Re: MSflexgrid question
How about adding the contents of the MSFlexgrid to a text file and then adding that to the RichTextBox
-
Dec 20th, 2007, 10:00 AM
#12
Re: MSflexgrid question
 Originally Posted by RhinoBull
No, it is avalable for either flexgrid
Yeah you're right (however MSDN Library states differently). I also just tried the code you posted and it works just fine for me.
-
Dec 20th, 2007, 10:04 AM
#13
Thread Starter
Addicted Member
Re: MSflexgrid question
I'll have another look at my code and try and find the reason the data is not exporting.
I have 5 columns on my MSflexgrid.
-
Dec 20th, 2007, 10:22 AM
#14
Thread Starter
Addicted Member
**RESOLVED** MSflexgrid question
Hi,
all is working now. Thanks for all your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|