Solved

MSFlexGrid Usage in VB5..

Posted on 1998-05-21
13
342 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 6

Accepted Solution

by:
clifABB earned 50 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

Technology Partners: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
passing parameter in sql procedure 9 70
Access 2013 combo box not working 3 74
Problem to With line 4 86
Excel Automation VBA 19 116
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

734 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