Re: ByVal and ByRef with MSFlexgrid acts the same (IN VB6)
- From: " Screaming Eagles 101" <fiwiATbelgacomDOTnet>
- Date: Wed, 26 Oct 2005 08:13:41 +0200
"Rick Rothstein [MVP - Visual Basic]" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
schreef in bericht news:em7ENvW2FHA.1576@xxxxxxxxxxxxxxxxxxxxxxx
....
> You could highlight the entire original grid of data, copy that
> selection to a String variable via the Clip method and pass this
> String variable into your Sub. The rows of data are delimited by
> carriage return characters (vbCr) and the columns within rows are
> delimited by tab characters (vbTab). If you carry a second,
> separate grid on any one of your forms, you could simply assign
> this passed data from the original grid to this second grid by
> assigning the passed String variable via the Clip method of this
> second grid.
>
> Sub <<some event on your form>>
> With MSFlexGrid1
> .Row = 0
> .Col = 0
> .RowSel = .Rows - 1
> .ColSel = .Cols - 1
> DataFromGrid = .Clip
> Call YourSub(DataFromGrid)
> ....
> ....
> End With
> End Sub
>
> Sub YourSub(DataIn As String)
> MSFlexGrid2.Clip = DataIn
> ' At this point, MSFlexGrid2 will be an exact
> ' copy of MSFlexGrid1
> ....
> ....
> End Sub
>
> Note that I set the Row and Col properties to 0 in the calling
> event; this will copy the headers as well as the data. I did this
> so that the Row and Col for the data elements will "line up"
> between the two grids. If you only need the data (and not the
> headers), change these two statements to this...
>
> .Row = .FixedRows
> .Col = .FixedCols
>
> Rick
>
Great code !
--
http://users.skynet.be/101airborne
Official Site of the 463rd PFA
.
- References:
- ByVal and ByRef with MSFlexgrid acts the same (IN VB6)
- From: Screaming Eagles 101
- Re: ByVal and ByRef with MSFlexgrid acts the same (IN VB6)
- From: Rick Rothstein [MVP - Visual Basic]
- ByVal and ByRef with MSFlexgrid acts the same (IN VB6)
- Prev by Date: Re: VB6 program execution problems on seperate windows versions
- Next by Date: Re: Scroll mouse in Flexgrid using VB6.0
- Previous by thread: Re: ByVal and ByRef with MSFlexgrid acts the same (IN VB6)
- Next by thread: Lost Up/Down Buddy Data.....
- Index(es):
Relevant Pages
|