|
-
Sep 9th, 2012, 09:48 AM
#1
Thread Starter
Fanatic Member
Run Time Error 5 (Invalid procedure column or argument
Hi
When i move from 7 column to another column it gives this error
Private Sub flxgd_EnterCell()
With flxgd
Select Case .Col
Case 4
msgtxt.Enabled = True
msgtxt.Visible = True
msgtxt.SetFocus
msgtxt.Move flxgd.Left + flxgd.CellLeft, flxgd.Top + flxgd.CellTop, flxgd.CellWidth, flxgd.CellHeight
msgtxt.Text = .Text
Case 7 To (flxgd.Cols - 1)
msgtxt.Enabled = True
msgtxt.Visible = True
msgtxt.SetFocus
msgtxt.Move flxgd.Left + flxgd.CellLeft, flxgd.Top + flxgd.CellTop, flxgd.CellWidth, flxgd.CellHeight
msgtxt.Text = .Text
End Select
End With
End Sub
Thanks
-
Sep 9th, 2012, 11:33 AM
#2
Re: Run Time Error 5 (Invalid procedure column or argument
What line does the error occur on?
-
Sep 9th, 2012, 11:39 AM
#3
Thread Starter
Fanatic Member
Re: Run Time Error 5 (Invalid procedure column or argument
Hi
On this line
msgtxt.Move flxgd.Left + flxgd.CellLeft, flxgd.Top + flxgd.CellTop, flxgd.CellWidth, flxgd.CellHeight
Thanks
-
Sep 9th, 2012, 03:07 PM
#4
Re: Run Time Error 5 (Invalid procedure column or argument
Have you checked the values of the parameters on that line when the error occurs? I.E. while the program is stopped on that line hover your mouse over each parameter to see what its value is.
-
Sep 9th, 2012, 06:25 PM
#5
Re: Run Time Error 5 (Invalid procedure column or argument
I would have a look at the width and height the others can be 0 or less
whats the error you are getting?
try to hover over the parameters as datamiser said
-
Sep 10th, 2012, 01:24 AM
#6
Re: Run Time Error 5 (Invalid procedure column or argument
Well, I can't make it fail
Code:
Private Sub flxgd_EnterCell()
With flxgd
Select Case .Col
Case 4, 7 To .Cols - 1
msgtxt.Enabled = True
msgtxt.Visible = True
msgtxt.SetFocus
msgtxt.Move .Left + .CellLeft, .Top + .CellTop, .CellWidth, .CellHeight
msgtxt.Text = .Text
End Select
End With
End Sub
Private Sub Form_Load()
Dim intI As Integer
Dim intJ As Integer
flxgd.Cols = 10
flxgd.Rows = 5
flxgd.FixedCols = 1
flxgd.FixedRows = 1
For intI = 0 To flxgd.Rows - 1
For intJ = 0 To flxgd.Cols - 1
flxgd.TextMatrix(intI, intJ) = intJ
Next intJ
Next intI
End Sub
Did you post the exact code or just the edited highlights?
Last edited by Doogle; Sep 10th, 2012 at 06:15 AM.
-
Sep 10th, 2012, 04:18 AM
#7
Addicted Member
Re: Run Time Error 5 (Invalid procedure column or argument
what are you trying to do ??
do you want to move msgtxt to the selected column ??
Sorry for bad english. 
-
Sep 10th, 2012, 06:13 AM
#8
Re: Run Time Error 5 (Invalid procedure column or argument
 Originally Posted by Max187Boucher
whats the error you are getting?
Looking at the Thread Title I'm guessing it's an 'Invalid Procedure Call or Argument' and the only way I can see of getting one of those, on the line OP says is failing, is if the Width and / or Height are less than zero; bearing in mind that the FlexGrid CellWidth and CellHeight are read only properties, I'm struggling to understand.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|