By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

How to call a module in vb.net?

P: 13
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
Apr 19 '07 #1
Share this Question
Share on Google+
1 Reply


hariharanmca
100+
P: 1,977

Post your reply

Sign in to post your reply or Sign up for a free account.