Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-06-2020, 09:25 PM
leeqiang leeqiang is offline I use an array to traverse the monthly worksheet summaries in the workbook, why the display types do Windows 10 I use an array to traverse the monthly worksheet summaries in the workbook, why the display types do Office 2019
Advanced Beginner
I use an array to traverse the monthly worksheet summaries in the workbook, why the display types do
 
Join Date: Aug 2020
Posts: 49
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I copy a worksheet and paste values to another new workbook ? DBenz Excel 1 01-26-2019 07:03 AM
Sharing a Workbook that contains array formula link to other workbook Ahmad.rage22@gmail.com Excel 0 03-12-2018 10:15 PM
Outlook 2016 calendar monthly display Herbert Outlook 0 09-22-2017 04:41 AM
How do I populate Worksheets using information entirely from another Worksheet in the same Workbook? BrieDanielle Excel 1 06-18-2016 10:50 AM
Counting unique visitors by ward, counting monthly visits by status, editing existing workbook JaxV Excel 9 11-14-2014 12:25 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft