First of all, I hope everyone is safe and healthy. I have a code written in VBA that runs in the ArcGIS environment (GEPIC). The code is linked with an executable file (EPIC.exe). During the executable run, the results are written in text files. The issue is that the executable run stops before all the results are written in text files. It does not display any message. A part of the code is attached. Thank you all in advance.
in line 42, 43, the original code format was
Dim i As Long
Dim X, Y As Single
I have changed both dimensions as Double
and in line 333
Dim DEM As Integer
Dim Slope As Integer
Dim s As Single
Dim Landuse As Integer
Dim Soil As Integer
Dim Climate As Long
Dim IRR As Integer
Dim Area As Integer
Dim Country As Long
'Dim FER As Integer
Dim MaxIrr As Integer
Dim ColNo As Integer
Dim RowNo As Integer
I also have changed all the dimensions as Double
I apologize if I did not put the issue right. I am a junior software developer in VBA.
I didn't download the attachment. 33.4 KB of code? And that attachment is just part of the code? Good luck getting anyone to go through all of that.
A variable has a purpose. Blindly changing all variable types as a way of troubleshooting an issue isn't troubleshooting at all.
You should know what the purpose of each variable is, and therefore what type of data it needs to hold. From there you should be able to declare each variable as the proper type.
Thank you from the prompt reply. Of course and I know what is the purpose of each variable but I get confused what type it needs to hold. I also have tried with other types such as long but I get most of the results by declaring the variable type as double. Maybe the mistake is somewhere else. I stated from the beginning that I am junior software developer and I apologized.
I am still not clear on how your VBA code and the EPIC.exe file are linked. Where is your text file written out? Is it created by your VBA code or by the EPIC.exe program?
I am still not clear on how your VBA code and the EPIC.exe file are linked. Where is your text file written out? Is it created by your VBA code or by the EPIC.exe program?
Dear jdc2000 ,
Thank you for your prompt reply. Epic.exe runs with VBA code data, as a result, EPIC.exe creates the text files.
Epic.exe checked. I have to declare my variables correct in the VBA code. In that part, I think the problem lies. It is a complicated issue.