devxlogo

Enter Data on an MSFlexGrid

Enter Data on an MSFlexGrid

You can use MSFlexGrid for data entry without using additional ActiveX controls. For this, use the KeyPress and KeyUp events. To use the MSFlexGrid for data entry, add the grid?named FlxGrdDemo?to a form and copy this code:

 Private Sub FlxGrdDemo_KeyPress(KeyAscii As Integer)	Select Case KeyAscii		Case vbKeyReturn			' When the user hits the return key 			' this code'll move the next cell or row.			With FlxGrdDemo				If .Col + 1  "" Then _					.Text = Mid(.Text, 1, Len(.Text) - 1)			End With		Case Is 

You can set the FillStyle property to FlexFillRepeat, which makes the changes to all the selected cells.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist