Solved

MSFlexGrid Usage in VB5..

Posted on 1998-05-21
13
335 Views
Last Modified: 2008-02-01
1. Is it possible to input data in MSFlexGrid cell ?

2. How can I select all cells in MSFlexGrid with code ?
   - Is there any property, method or event which I can use
     for selecting all cells  ?
   
0
Comment
Question by:can9999
  • 7
  • 3
  • 3
13 Comments
 
LVL 4

Expert Comment

by:zsi
Comment Utility
can9999,

You cannot input data directly into an MSFlex grid.  You can, however, overlay a textbox on top of the cell that you want to edit and make it appear as if you are editing directly into the grid.  This technique will also work for comboboxes in a cell.

As for selecting all of the cells, try this:

With MSFlexGrid
   .Row = 0
   .Col = 0
   .RowSel = .Rows
   .ColSel = .Cols
End With

This should work, although I haven't tried it.  I seem to be having a problem with the control license. I will have to re-install my control, but I wanted to get an answer to you quickly.  If it didn't work, tell me and I will try it again.  I will have the control re-installed by then.  :)

Hope this helps!
zsi
0
 
LVL 1

Author Comment

by:can9999
Comment Utility
Your answer did not work !

At first, please try it yourself !

Thank you ..

0
 
LVL 4

Expert Comment

by:zsi
Comment Utility
can9999,

That was out of the help file.  The one that comes with the FlexGrid control.  There is a help file that comes with the control.
0
 
LVL 6

Accepted Solution

by:
clifABB earned 50 total points
Comment Utility
The reason why your code to select all cells didn't work is that the last row/col is Rows-1/Cols-1 so your code should read:
  With MSFlexGrid1
   .Row = 0
   .Col = 0
   .RowSel = .Rows - 1
   .ColSel = .Cols - 1
End With

As far as inputting data (which I assume you mean you want to type data from the keyboard).

1. Place a Textbox on the form.  Set it's visible property to false.  Set it's BorderStyle to 0-None.
2. In the EnterCell event of the Flex Grid, Place the following code:
Private Sub MSFlexGrid1_EnterCell()

  With MSFlexGrid1
    Text1.Move .Left + .CellLeft, .Top + .CellTop, .CellWidth, .CellHeight
    Text1.Visible = True
  End With
End Sub

This will get you going.
0
 
LVL 4

Expert Comment

by:zsi
Comment Utility
clifABB,

Thanks for helping with that.  I keep getting an error message when I try to use the control at design time ("License Information for this component not found."), so I was unable to test the code.  Obviously, if MS could get their installation programs to work properly, I would have been able to catch that.

As it is, I had to uninstall VB5 and re-install it as the administrator of my machine (as per MS' direction for NT installations).  It still didn't work, so now I have to RegClean the machine which, in all probability, will render the entire machine useless.

zsi
0
 
LVL 6

Expert Comment

by:clifABB
Comment Utility
"License Information for this component not found."

You know, I'd like to know what causes that.  It's happened to me on occasion and, although reinstalling fixes it for me, it still happens once in a while.  Even more frustrating, it's not always the same control.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 4

Expert Comment

by:zsi
Comment Utility
clifABB,

Check out MSDN Q155059.  It is the closest thing to an answer that I have found.

Unfortunately, it doesn't work.
0
 
LVL 6

Expert Comment

by:clifABB
Comment Utility
That's all well and good, but it refers to C++ on an NT machine.  I haven't installed C++ *and* I'm running Win95.

I suppose it comes down to a corrupt registry.  But what causes the corruption?
0
 
LVL 1

Author Comment

by:can9999
Comment Utility
"License Information for this component not found."

Do you know this ?

The serect of "tools\controls\Vbctrls.reg" In vb5 CD,

Dbclick that file and copy all files that placed that dir to "\windows\system"
, and the message will be disappeared.

And Thank You...


0
 
LVL 4

Expert Comment

by:zsi
Comment Utility
can9999,

You rejected my answer by saying "it didn't work" without stating  what the error was with the code example (invalid property value).

Had you given me, the person answering the question, a chance to correct the answer, you would not have assigned the credit for the answer to the wrong person.  

Rest assured that, in the future, I will give more careful consideration before answering your questions.
0
 
LVL 4

Expert Comment

by:zsi
Comment Utility
Oh, and the registry file that you referred to does not work.
0
 
LVL 1

Author Comment

by:can9999
Comment Utility
Well...

I'd solved the same problem. (Threed32.ocx).

I'm sorry.

0
 
LVL 4

Expert Comment

by:zsi
Comment Utility
Because I am such a nice guy, I am posting this solution here..  :)

==================================================
FILE: Vbc.exe Fixes VB 5.0 Control Installation Problem

     Last reviewed: March 13, 1998
     Article ID: Q181854
     The information in this article applies to:

          Microsoft Visual Basic Control Creation, Learning, Professional, and Enterprise Editions for Windows, version 5.0

     SUMMARY

     Vbc.exe installs the Vbcmpfix.exe utility, that fixes problems with the following three symptoms:

     Symptom I

     When trying to site a control within your project, you receive the following error message:

        License Information For This Component Not Found.  You Do Not Have An
        Appropriate License To Use This Functionality In The Design Environment.


     Symptom II

     When trying to compile your project, you receive the following error:

        Compile Error : Permission Denied


     Symptom III

     When trying to run your project, you receive the following error:

        Runtime Error '429' : ActiveX Component Can't Create Object


     MORE INFORMATION

     The following file is available for download from the Microsoft Software Library:

      ~ Vbc.exe (size: 36208 bytes)

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

772 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

16 Experts available now in Live!

Get 1:1 Help Now