?
Solved

Page fault when adding code

Posted on 2005-03-24
7
Medium Priority
?
151 Views
Last Modified: 2010-05-02
Hello - I'm an ex-mainframe programmer having learned VB on my own. I have a program which works fine and I would like to change the literals on the screens so that the user can choose a language (English, Spanish, etc.) to use. The program works fine, but when I call a subroutine to process nothing but assigns ( A = B, etc.), the program aborts with an invalid page fault. If I do not call the subroutine, the programs works.
It appears to me that I am exceeding a table of sorts, or maybe the limit of some type of memory restrain. I have VB 6 studio, with sp5 and sp6 installed. I'm using indexed and sequential files.

Any suggestions would be much appreciated. Thanks.
0
Comment
Question by:VB6Software
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13625475
Maybe a post of your sub routine would help because then the experts could possibly see where the sub routine is going wrong ?
0
 
LVL 19

Expert Comment

by:Shauli
ID: 13625490
Ther are several reasons why this can happen. In general it means that you have referred to a memory block (store or call) but the block does not exist. So, pls post the sub code here, and we'll see what we can do.

S
0
 

Author Comment

by:VB6Software
ID: 13636836
Hello -
   I did some research on form loading and it appears that the problem is with too many forms loading. When a caption (or other field) is changed on a form, the form is loaded first and the Form_load subroutine is executed within the form. I have abut 20 forms in the program and that creates a problem. In an effort to get it to work, I tried to load the form, make the assignments, then unload the form - but that action did not retain the assignments. So my solution, though a bit tedious, was to replace any Form.Show statements with a call to a subroutine for that form to make the assignments with the proper language and perform the .show within the subroutine. It works.
One other comment: I found a number of notes from others about quirks concerning Windows 98SE, which I am using. Maybe this would not have happened using XP, but I wanted to make the program versital enough for any Windows version.
Thank you for your notes.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13636892
So you have 20 additional forms that open when you run the first form ie the main window ? ok now I am lost and do not understand why anyone would want that many forms open at once lol
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 14364967
Good information to know, about open form # being a limitation
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14395795
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question