Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

set focus to the first cell in the grid - vb6

Posted on 2014-09-18
3
Medium Priority
?
387 Views
Last Modified: 2014-09-18
I need to automatically setfocus to the first cell (1,1) in my MSFlexgrid on the LostFocus event of my grid. How can I do that simply?

Thanks in advance
0
Comment
Question by:al4629740
[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
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 40331945
(0, 0) would be the first cell but I used (1, 1).
Private Sub MSFlexGrid1_LostFocus()

With MSFlexGrid1
    .Row = 1
    .Col = 1
    .SetFocus
End With

End Sub

Open in new window

0
 

Author Comment

by:al4629740
ID: 40331960
What can I do to make sure (0,0) exists first before processing the code.  I will be doing this from another event also.
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40331985
What do you mean when you ask if (0, 0) exists? (0, 0) always exists. Do you mean instead if it has something in it?
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

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.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…
Suggested Courses

715 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