?
Solved

MSFlexGrid Usage in VB5..

Posted on 1998-05-21
13
Medium Priority
?
346 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
[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
  • 7
  • 3
  • 3
13 Comments
 
LVL 4

Expert Comment

by:zsi
ID: 1456438
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
ID: 1456439
Your answer did not work !

At first, please try it yourself !

Thank you ..

0
 
LVL 4

Expert Comment

by:zsi
ID: 1456440
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
Independent Software Vendors: 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!

 
LVL 6

Accepted Solution

by:
clifABB earned 150 total points
ID: 1456441
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
ID: 1456442
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
ID: 1456443
"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
 
LVL 4

Expert Comment

by:zsi
ID: 1456444
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
ID: 1456445
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
ID: 1456446
"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
ID: 1456447
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
ID: 1456448
Oh, and the registry file that you referred to does not work.
0
 
LVL 1

Author Comment

by:can9999
ID: 1456449
Well...

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

I'm sorry.

0
 
LVL 4

Expert Comment

by:zsi
ID: 1456450
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

800 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