Error '381' Subscript Out Of Range
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About subscript out of range access error Us Learn more about Stack Overflow the company Business Learn more about hiring developers subscript out of range excel error or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack subscript out of range vba error Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why is VB6 FlexGrid throwing a run-time vba subscript out of range error 9 error 381 'Subscript out of range'? up vote 0 down vote favorite I don't really know much about VB6, but I am currently having a problem with double clicking a cell in a FlexGrid. I can see that this is a popular question that has been asked many times, but most of the users are looping around the grid. Mine is more simple, but yet it
Subscript Out Of Range Error Access 2010
crashes. The grid has 3 rows and 3 columns. When double clicking on any of the columns from the first row, it works fine. But when I get to the others, it throws an error. The error says: Run-time error '381': Subscript out of range. It currently crashes at the following line, where the row is 2 and the col is 3: TextMatrix = myFlexGrid.TextMatrix(row, col) I am just wondering why it crashes when the indexes of the row and the column are fine. I thought that it might be zero-based but when clicking the third cell on the first row, it works fine. Is there a way to see the contents of the grid in the debugger (Microsoft Visual Basic 6.0)? vb6 msflexgrid share|improve this question asked Jun 11 '15 at 12:31 Apostrofix 70931632 Could we see a bit more of the function being called here? The origin of all the variables isn't clear. –CMaster Jun 11 '15 at 13:31 @CMaster it is really difficult for me to post some code, as everything is split around and it is a part of a huge project. But perhaps I have to change the ti
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time
Subscript Out Of Range Error In Qtp
Help Create a Freelance Project Hire for a Full Time Job subscript out of range error when importing excel into access Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers subscript out of range error access 2013 Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Run time error 381 - Subscript out of range in VB 6 Want to Advertise Here? http://stackoverflow.com/questions/30780878/why-is-vb6-flexgrid-throwing-a-run-time-error-381-subscript-out-of-range Solved Run time error 381 - Subscript out of range in VB 6 Posted on 2008-01-07 Visual Basic Classic 1 Verified Solution 6 Comments 2,001 Views Last Modified: 2011-10-03 I receive a "Run time error 381 - Subscript out of range" error in VB 6 when I am trying to populate a grid. The error line https://www.experts-exchange.com/questions/23063901/Run-time-error-381-Subscript-out-of-range-in-VB-6.html highlighted is below:P MSHFlexGridDate.TextMatrix(aintj, 1) = ars.Fields("CaseID").Value 0 Question by:Tony789 Facebook Twitter LinkedIn Google LVL 3 Best Solution bySpeedFingolf Why don't you change the lines that states MSHFlexGridDate.TextMatrix(aintj, 1) = ars.Fields("CaseID").Value ... for MSHFlexGridDate.TextMatrix(MSHFlexGridDate.Rows -1 , 1) = ars.Fields("CaseID").Value Go to Solution 6 Comments LVL 142 Overall: Level 142 Visual Basic Classic 32 Message Active today Expert Comment by:Guy Hengel [angelIII / a3]2008-01-07 that means that either aintj or/and 1 are out of range... 0 LVL 3 Overall: Level 3 Visual Basic Classic 2 Message Expert Comment by:SpeedFingolf2008-01-07 This error may be occuring because you are trying to add a value into a row that do not exist. Have you checked your aintj value? have you compared its value with the MSHFlexGridDate.Rows value. Remember that the last row's index is MSHFlexGridDate.Rows -1. If your aintj value is greater or equal to MSHFlexGridDate.Rows then you will not be able to set its TextMatrix property. 0 Message Author Comment by:Tony7892008-01-07 Below is what I have. MSHFlexGridDate.Clear <
Technology and Trends Enterprise Architecture and EAI ERP Hardware IT Management and Strategy Java Knowledge Management Linux Networking Oracle PeopleSoft Project and Portfolio Management SAP SCM Security http://visualbasic.ittoolbox.com/groups/technical-functional/visualbasic-l/subscript-out-of-range-error381-974754 Siebel Storage UNIX Visual Basic Web Design and Development Windows < Back http://www.xtremevbtalk.com/database-and-reporting/160839-flexgrid-run-time-error-381-subscript-range.html CHOOSE A DISCUSSION GROUP Research Directory TOPICS Database Hardware Networking SAP Security Web Design MEMBERS Paul_Pedant MarkDeVries DACREE Inside-ERP MacProTX VoIP_News Inside-CRM PCMag maxwellarnold I_am_the_dragon Michael Meyers-Jouan TerryCurran Chris_Day Andrew.S.Baker JoeTorre bracke Locutus Ramnath.Awate DukeGanote Craig Borysowich Dennis Stevenson Richard mircea_luca Nikki Klein AbhaiTripathi knowscognosdoi Clinton Jones blrvenkat Iqbalyk bluesguyAZ59 COMPANIES subscript out RSA Conference UC4 Apperian Sophos View All Topics View All Members View All Companies Toolbox for IT Topics Visual Basic Groups Ask a New Question Visual Basic – General Discussions The VB - General Discussions group is a forum where peers share technical expertise, solve problems, and discuss issues related to the use of the Visual Basic programming language. Home | Invite Peers subscript out of | More Visual Basic Groups Your account is ready. You're now being signed in. Solve problems - It's Free Create your account in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters. No spaces please The Profile Name is already in use Password Notify me of new activity in this group: Real Time Daily Never Keep me informed of the latest: White Papers Newsletter Jobs By clicking "Join Now", you agree to Toolbox for Technology terms of use, and have read and understand our privacy policy. Subscript out of range error(381) Ellen asked Apr 5, 2006 | Replies (11) When I try to run my program it gives me this error"Subscript out of range(381).Can someone explain to me what it means.I'm usingb VB6 and Access database Join this group Popular White Paper On This Topic ERP: The Layman's Guide 11Replies Best Answer 0 Mark this reply as the best answer?(Choose carefully, this can't be changed) Yes | No Saving... Daniele Giabbai replied Apr 5, 2006 Just add an "on error goto ..." statement in each p
Database and Reporting > Flexgrid problem - Run time error 381 - Subscript out of range Thread Tools Display Modes #1 04-14-2004, 02:52 PM VBKid04 Centurion Join Date: Mar 2004 Posts: 138 Flexgrid problem - Run time error 381 - Subscript out of range I have a flexgrid which i am populating, and then when the user clicks on a row, the data for that row is passed to textboxes. This works fine usually until the form is refreshed (ie. There is a refresh button, and after it is pressed, if you try to browse around, this error is thrown). (There is also an update button which calls a refresh, and again after this, if you attempt to browse around, this error is thrown). Can anyone help me out? What does it even mean and what am I looking for to fix ? It has highlighted one of the lines I am passing back to a textbox using the .TextMatrix property - but I cant see the problem with this, as before the user Refreshes the page this works just fine! Someone please help! VBKid04 View Public Profile Find all posts by VBKid04 #2 04-14-2004, 02:57 PM Flyguy Lost Soul Super Moderator* Guru * Join Date: May 2001 Location: Vorlon Posts: 19,124 This error is raised when you try to access a non existent cell. For example you pass a column number which exceeds the number of columns in the grid. Flyguy View Public Profile Find all posts by Flyguy #3 04-14-2004, 03:00 PM LaVolpe Ultimate Contributor * Expert * Join Date: Apr 2004 Location: Illinois Posts: 2,499 The error generally means an Array of something is goofed (i.e., trying to get the 10th element of an array of 9 items for example). Suggest posting the highlighted line for others to view. __________________ Insomnia is a simple byproduct of "it can't be done" {Window Shaper} LaVolpe View Public Profile Find all posts by LaVolpe