JerryKing
Mechanical
- Jun 12, 2007
- 4
The purpose of my program is to realize the expert reasoning through a sequence of dialogs interacting with a user. All the user inputs of reasoning procedure need to be recorded for future enquiry in a database. The architecture of the reasoning procedure is like a pyramid, from top to bottom. VB scripts or VBA can be used for this application software. I’d like to define a global object, so that it can be used both for arguments and for saving user inputs. Unfortunately, my following codes do not work. Seems there are problems of declare global variable as a structure object. How to fix the problem? Are there some better ways for doing this? Thanks.
Public Structure Operation
Public attributes()
End Structure
Global m_operation as Operation
Sub GetAttribute01(m_operation)
m_operation.attributes(0) = Dialog.GetCurrentVal()
End sub
…
Sub main(id)
GetAttribute01(m_operation)
GetAttribute02(m_operation)
GetAttribute03(m_operation)
…
End sub
Public Structure Operation
Public attributes()
End Structure
Global m_operation as Operation
Sub GetAttribute01(m_operation)
m_operation.attributes(0) = Dialog.GetCurrentVal()
End sub
…
Sub main(id)
GetAttribute01(m_operation)
GetAttribute02(m_operation)
GetAttribute03(m_operation)
…
End sub