From: Gary on
Sample code to illistrate the problem.
If MSFlexGrid1.Col = 0 And MSFlexGrid1.Row >= 0 Then
Exit Sub
End If

I put this as the first line of code in the msflexgrid1 click, enter cell
and leave cell event but when you click any row in column 0, column 1 next
to column 0 gets selected and it still executes any code under this
statement. Is there any way to prevent this? I want to be able to click on
any cell in any row under column 0 and have nothing happen.

Thanks much for any help!


From: ralph on
On Thu, 5 Aug 2010 13:57:36 -0400, "Gary" <private(a)comcast.net> wrote:

>Sample code to illistrate the problem.
>If MSFlexGrid1.Col = 0 And MSFlexGrid1.Row >= 0 Then
>Exit Sub
>End If
>
>I put this as the first line of code in the msflexgrid1 click, enter cell
>and leave cell event but when you click any row in column 0, column 1 next
>to column 0 gets selected and it still executes any code under this
>statement. Is there any way to prevent this? I want to be able to click on
>any cell in any row under column 0 and have nothing happen.
>
>Thanks much for any help!
>

Need more information.
What SelectionMode are you using?
Is Column 0 fixed?
What do you mean by having "nothing happen", as the 'default' is to
make the grid aware and thus respond to what the user is doing.
Perhaps catch the RowColChange Event and put things back????

You might want to capture MouseCol/MouseRow in a variable.
Note: these values can change while running in the IDE.

-ralph
From: Gary on
Thank you! Thanks for making me check that. Problem solved. I had a column
fixed which was throwing everything off.


"ralph" <nt_consulting64(a)yahoo.net> wrote in message
news:qt0m56d28m2s0pmd6pn9f77479tl93k823(a)4ax.com...
> On Thu, 5 Aug 2010 13:57:36 -0400, "Gary" <private(a)comcast.net> wrote:
>
>>Sample code to illistrate the problem.
>>If MSFlexGrid1.Col = 0 And MSFlexGrid1.Row >= 0 Then
>>Exit Sub
>>End If
>>
>>I put this as the first line of code in the msflexgrid1 click, enter cell
>>and leave cell event but when you click any row in column 0, column 1 next
>>to column 0 gets selected and it still executes any code under this
>>statement. Is there any way to prevent this? I want to be able to click on
>>any cell in any row under column 0 and have nothing happen.
>>
>>Thanks much for any help!
>>
>
> Need more information.
> What SelectionMode are you using?
> Is Column 0 fixed?
> What do you mean by having "nothing happen", as the 'default' is to
> make the grid aware and thus respond to what the user is doing.
> Perhaps catch the RowColChange Event and put things back????
>
> You might want to capture MouseCol/MouseRow in a variable.
> Note: these values can change while running in the IDE.
>
> -ralph