Click here to Skip to main content
15,920,508 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Embed MS Windows Explorer in Access Form Pin
Eddy Vluggen2-Dec-09 0:56
professionalEddy Vluggen2-Dec-09 0:56 
QuestionVBA in Visual Basic Pin
Sondre Minnesjord1-Dec-09 4:43
Sondre Minnesjord1-Dec-09 4:43 
AnswerRe: VBA in Visual Basic Pin
Dave Kreskowiak1-Dec-09 4:48
mveDave Kreskowiak1-Dec-09 4:48 
GeneralRe: VBA in Visual Basic Pin
Sondre Minnesjord1-Dec-09 4:56
Sondre Minnesjord1-Dec-09 4:56 
GeneralRe: VBA in Visual Basic Pin
Dave Kreskowiak1-Dec-09 5:09
mveDave Kreskowiak1-Dec-09 5:09 
GeneralRe: VBA in Visual Basic Pin
Sondre Minnesjord1-Dec-09 20:17
Sondre Minnesjord1-Dec-09 20:17 
GeneralRe: VBA in Visual Basic Pin
Dave Kreskowiak2-Dec-09 0:38
mveDave Kreskowiak2-Dec-09 0:38 
QuestionRe: VBA in Visual Basic - Pin
Sondre Minnesjord18-Feb-10 21:22
Sondre Minnesjord18-Feb-10 21:22 
Hi,

I've run into a major problem. As described earlier, I couldn't figure out how to make my code work in vb.NET, when it worked fine in VBA. That problem was resolved and everything has worked fine until yesterday when suddenly everything stopped working. I think I've managed to isolate the problem, but cannot figure out why it occurs:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button2.Click

Dim Analysis As New OPENSTAADLib.Output
Dim nLC As Integer = 0

Analysis.SelectSTAADFile("c:\temp\PSDesigner\PS-1_Operation.std")
Analysis.AnalyzeStructure("NORWAY")
Analysis.GetLoadCombinationCaseCount(nLC)
MsgBox(nLC)

End Sub

Short explanation:

OPENSTAADLib is an external COM component which I had to reference in order to access. The OPENSTAADLib.Output object is used to run an input file for a structural analysis. The "AnalyzeStructure" command is the actual analysis, whereas the GetLoadCombinationsCaseCount is an example of a function to retrieve information from the results of the analysis.

- Now I get this error message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
- I tried putting the functions inside Try blocks, and made them loop back a number of times in order to retry. That helped a little, but it seems to be all random whether it works or not.
- when I start the debugging, I can run the sub once or even twice without problems, but then it won't work any longer.

The exception message says: "External component has thrown an exception". I also have seen the System out of memory exception, even though (according to the windows task manager) the program does not use a lot of resources.

I am still a quite unexperienced programmer and I really don't know how to resolve this or even where to begin look for answers (except her on codeproject, of course).
Sondre M

AnswerRe: VBA in Visual Basic - Pin
Dave Kreskowiak19-Feb-10 1:42
mveDave Kreskowiak19-Feb-10 1:42 
GeneralRe: VBA in Visual Basic - Pin
Sondre Minnesjord19-Feb-10 2:42
Sondre Minnesjord19-Feb-10 2:42 
GeneralRe: VBA in Visual Basic - Pin
Dave Kreskowiak19-Feb-10 12:52
mveDave Kreskowiak19-Feb-10 12:52 
QuestionVisual Basic 6 Pin
goldenrose91-Dec-09 4:35
goldenrose91-Dec-09 4:35 
AnswerRe: Visual Basic 6 Pin
Dave Kreskowiak1-Dec-09 4:46
mveDave Kreskowiak1-Dec-09 4:46 
GeneralRe: Visual Basic 6 Pin
goldenrose91-Dec-09 6:30
goldenrose91-Dec-09 6:30 
GeneralRe: Visual Basic 6 Pin
The Man from U.N.C.L.E.1-Dec-09 6:42
The Man from U.N.C.L.E.1-Dec-09 6:42 
AnswerRe: Visual Basic 6 Pin
EliottA1-Dec-09 4:48
EliottA1-Dec-09 4:48 
GeneralRe: Visual Basic 6 Pin
Shameel1-Dec-09 7:14
professionalShameel1-Dec-09 7:14 
AnswerRe: Visual Basic 6 Pin
Christian Graus1-Dec-09 5:29
protectorChristian Graus1-Dec-09 5:29 
GeneralRe: Visual Basic 6 Pin
Shameel1-Dec-09 7:15
professionalShameel1-Dec-09 7:15 
GeneralRe: Visual Basic 6 Pin
Christian Graus1-Dec-09 7:19
protectorChristian Graus1-Dec-09 7:19 
GeneralRe: Visual Basic 6 Pin
Shameel1-Dec-09 7:28
professionalShameel1-Dec-09 7:28 
GeneralRe: Visual Basic 6 Pin
Christian Graus1-Dec-09 7:43
protectorChristian Graus1-Dec-09 7:43 
GeneralRe: Visual Basic 6 Pin
Dave Kreskowiak1-Dec-09 8:36
mveDave Kreskowiak1-Dec-09 8:36 
GeneralRe: Visual Basic 6 Pin
Dave Kreskowiak1-Dec-09 7:25
mveDave Kreskowiak1-Dec-09 7:25 
GeneralRe: Visual Basic 6 Pin
Shameel1-Dec-09 7:32
professionalShameel1-Dec-09 7:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.