[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

MsFlexGrid Delete Last Row

Posted on 2004-03-20
3
Medium Priority
?
348 Views
Last Modified: 2013-12-25
Two quick and possible easy questions,

I can't delete the last row of my msflexgrid
It says Can not delete the last non-fixed row
Run time error 30015

here is my code

Private Sub Delete_click()
tablegrid.RemoveItem (tablegrid.Rowsel)

Secondly
How can i make it where multiple rows are selected they will all be deleted.
0
Comment
Question by:neutrinohunter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Expert Comment

by:Sethi
ID: 10642612
There should be minimum one row in a flexgrid at any point of time and this is its inbuilt design. You will have to ensure error handlers in your code for this error if you provide row deletion functionality in your code.
0
 
LVL 5

Accepted Solution

by:
jayeshshah earned 90 total points
ID: 10645797
try this code below for deleting the 1st row.

If MSFlexGrid1.Rows = 0 Then Exit Sub
    If (MSFlexGrid1.Rows - MSFlexGrid1.FixedRows) <= 1 Then
        MSFlexGrid1.Rows = MSFlexGrid1.Rows - 1
    Else
        MSFlexGrid1.RemoveItem MSFlexGrid1.RowSel
    End If


 Regards

JBS
0
 
LVL 5

Expert Comment

by:jayeshshah
ID: 10657878
thanx for the 'B' grade .... :-(
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question