MSFLEXGRID... delete entire row and move up the remail rows

User avatar
sal21
PlatinumLounger
Posts: 4576
Joined: 26 Apr 2010, 17:36

MSFLEXGRID... delete entire row and move up the remail rows

Post by sal21 »

i just have this code:

Code: Select all


Private Sub MSFlexGrid1_DblClick()

    With Me.MSFlexGrid1
        RW = .Row
        
        Stop
    
    End With

End Sub

how to delete entire row, based RW, end move up the remain other rows, from the delted row... similar Excel

note:
i have in msflexgrid1 only 2 column

User avatar
HansV
Administrator
Posts: 80088
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: MSFLEXGRID... delete entire row and move up the remail rows

Post by HansV »

.DeleteItem RW
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4576
Joined: 26 Apr 2010, 17:36

Re: MSFLEXGRID... delete entire row and move up the remail rows

Post by sal21 »

HansV wrote:
02 Dec 2024, 11:10
.DeleteItem RW
:cheers: :clapping:
tks bro

User avatar
HansV
Administrator
Posts: 80088
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: MSFLEXGRID... delete entire row and move up the remail rows

Post by HansV »

It was in the first search result on Google...
Best wishes,
Hans

User avatar
SpeakEasy
5StarLounger
Posts: 742
Joined: 27 Jun 2021, 10:46

Re: MSFLEXGRID... delete entire row and move up the remail rows

Post by SpeakEasy »

Er ... are we sure?

User avatar
HansV
Administrator
Posts: 80088
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: MSFLEXGRID... delete entire row and move up the remail rows

Post by HansV »

I'm just reporting what I found on Google - I cannot test it myself...
Best wishes,
Hans

User avatar
SpeakEasy
5StarLounger
Posts: 742
Joined: 27 Jun 2021, 10:46

Re: MSFLEXGRID... delete entire row and move up the remail rows

Post by SpeakEasy »

The MSFlexgrid does not have a DeleteItem method. It has RemoveItem

Which ijn turn would suggest that sal21 hasn't actually tested the suggested solution

User avatar
HansV
Administrator
Posts: 80088
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: MSFLEXGRID... delete entire row and move up the remail rows

Post by HansV »

You're correct - I did find RemoveItem but mistakenly wrote DeleteItem in my reply :sorry:
Best wishes,
Hans