VBNET_Beginnner
Member
- Joined
- Mar 12, 2007
- Messages
- 11
- Programming Experience
- Beginner
Hi, I would like to know how to call a module in vb.net?
I received this warning : TypeInitializeException was unhandled. The type initializer for 'SAPWVA.basDetail' threw an exception.
Below is my code.... Can anyone pls tell me whats wrong with my code?
Many thanks.
frmDetail :
Private Sub InitializeScreen()
With Me
gScrMode.Value = "INI"
.fraKey.Enabled = True
.lblStatus.Text = ""
.txtCustCode.Text = ""
...
..
.
Call basDetail.MenuControl(Me, 0, 0, 0, 0, 0, 0) ---warning shown at this line
.fraDetail.Enabled = True
.fraDetail.Visible = False
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
End With
End Sub
-------------------------------------------------------
basDetail :
Module basDetail
Dim GetDate As String
Dim StdRate As Decimal
Dim ctlMonth As Short
...
..
.
Dim vHexMth As New VB6.FixedLengthString("{0,-12}", "123456789ABC") 'YYH
'YYH -Amendment on Doc Ref, eg 0210 = 02A
Sub MenuControl(ByRef objForm As Object, ByRef V1 As Boolean, ByRef V2 As Boolean, ByRef V3 As Boolean, ByRef V4 As Boolean, ByRef V5 As Boolean, ByRef V6 As Boolean)
With objForm
.mnuCreate.Visible = V1
.mnuChange.Visible = V2
.mnuDelete.Visible = V3
.mnuSave.Visible = V4
.mnuCancel.Visible = V5
.mnuPrint.Visible = V6
End With
End Sub
I received this warning : TypeInitializeException was unhandled. The type initializer for 'SAPWVA.basDetail' threw an exception.
Below is my code.... Can anyone pls tell me whats wrong with my code?
Many thanks.
frmDetail :
Private Sub InitializeScreen()
With Me
gScrMode.Value = "INI"
.fraKey.Enabled = True
.lblStatus.Text = ""
.txtCustCode.Text = ""
...
..
.
Call basDetail.MenuControl(Me, 0, 0, 0, 0, 0, 0) ---warning shown at this line
.fraDetail.Enabled = True
.fraDetail.Visible = False
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
End With
End Sub
-------------------------------------------------------
basDetail :
Module basDetail
Dim GetDate As String
Dim StdRate As Decimal
Dim ctlMonth As Short
...
..
.
Dim vHexMth As New VB6.FixedLengthString("{0,-12}", "123456789ABC") 'YYH
'YYH -Amendment on Doc Ref, eg 0210 = 02A
Sub MenuControl(ByRef objForm As Object, ByRef V1 As Boolean, ByRef V2 As Boolean, ByRef V3 As Boolean, ByRef V4 As Boolean, ByRef V5 As Boolean, ByRef V6 As Boolean)
With objForm
.mnuCreate.Visible = V1
.mnuChange.Visible = V2
.mnuDelete.Visible = V3
.mnuSave.Visible = V4
.mnuCancel.Visible = V5
.mnuPrint.Visible = V6
End With
End Sub