Solved

Editing cell using grid32.ocx

Posted on 1998-10-21
7
294 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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.
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…

707 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