View Single Post
 
Old 10-06-2020, 09:25 PM
leeqiang leeqiang is offline Windows 10 Office 2019
Advanced Beginner
 
Join Date: Aug 2020
Posts: 53
leeqiang is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
You are creating variables without defining what type of data they are. If you define their types, you will be able to more easily spot the errors in your code. Looking at the first time the variables are assigned values, I would deduce the following types.

Dim i as Integer, j as Integer, p as Integer, q as Row

However, you then test q as if it is a number. I expect that would cause the Run-time error you encountered.



thank you!


write the q only,run the code the result as follows:
20201007122431.png
Reply With Quote