Solved

Editing cell using grid32.ocx

Posted on 1998-10-21
7
266 Views
Last Modified: 2008-02-01
Is there a way to edit individual cells using grid32.ocx similar to
the way text can be edited in a TextBox?
0
Comment
Question by:rmoscoso
  • 4
  • 2
7 Comments
 

Author Comment

by:rmoscoso
ID: 1440979
Edited text of question
0
 
LVL 3

Expert Comment

by:vmano
ID: 1440980
as far as i know, you can not do it. Probably what you can do is, present the contents of the cell in a text box, and allow editing the contents of that cell.
0
 

Author Comment

by:rmoscoso
ID: 1440981
Yes, that is the way I have been doing it.  Unfortunately the powers that be don't
want it that way.  Is there some other type of grid control that I may use that allows
this type of editing?  Or do I have to revert at making a grid out of text boxes?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:rmoscoso
ID: 1440982
Yes, that is the way I have been doing it.  Unfortunately the powers that be don't
want it that way.  Is there some other type of grid control that I may use that allows
this type of editing?  Or do I have to revert at making a grid out of text boxes?
0
 
LVL 3

Expert Comment

by:vmano
ID: 1440983
try VSFlexGrid Control. their web site www.videosoft.com. if you are using VB 6.0 Enterprise Edition, they are included in that.
0
 
LVL 2

Accepted Solution

by:
dabellei earned 100 total points
ID: 1440984
Private Sub Grid1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 8 Then
        If Len(Grid1.Text) > 0 Then
            Grid1.Text = Left(Grid1.Text, Len(Grid1.Text) - 1)
        Else
            Beep
        End If
    Else
        If (KeyCode > 64 And KeyCode < 90) Or (KeyCode = 32) Then
            Grid1.Text = Grid1.Text & Chr(KeyCode)
        End If
    End If
End Sub


With this code you put in the keydown event of your grid you could simulate what you want and yor editing in the grid directly that's the way i've done it before.
0
 

Author Comment

by:rmoscoso
ID: 1440985
Thank you much!!!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now