Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MSFlexGrid Delete Row


Hi all,

I have implemented an MSFlexGrid onto my form, I have a fixed row for
Header. I have a problem when deleting from the grid, see code below;


Code
-------------------

Private Sub ProductionGrid_DblClick()

Dim R$
Dim lCurRow As Long
lCurRow = ProductionGrid.Row

'delete row upon confirmation
MsgBox ProductionGrid.RowSel
If ProductionGrid.RowSel 0 Then
R = MsgBox("Are you sure you want to delete this line?", vbYesNo, "Confirm Delete")
If R = vbYes Then

If ProductionGrid.Rows = ProductionGrid.FixedRows + 1 Then
ProductionGrid.FixedRows = 0
End If
ProductionGrid.RemoveItem (lCurRow)
End If
End If
End Sub

-------------------


The code above is a modification to enable me to delete the last ro
without the error "unable to delete last non fixed row".

but now my header row is no longer fixed and I cant set it t
fixed....

Anyone else been having some trouble here? TI

--
gti_jober
-----------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...fo&userid=3063
View this thread: http://www.excelforum.com/showthread.php?threadid=53631

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mutliple selection in MSFlexgrid excelvish[_2_] Excel Programming 0 March 31st 06 09:13 AM
Datepicker not visible on the MSFlexgrid. Vishal Excel Programming 0 March 8th 06 09:10 AM
MSFlexGrid Jake[_10_] Excel Programming 2 January 19th 05 12:54 AM
paint row in MSFlexGrid sirron Excel Programming 0 October 6th 03 08:18 PM
MSflexgrid data sirron Excel Programming 1 September 19th 03 09:29 PM


All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"