4461766964
December 1st, 2004, 08:14 PM
Error: Property access must assign to the property or use its value.
This one is killing me. This is a upgrade problem from VB6 to .NET. I have several forms calling this code located inside a module. It provides that if someone hits Cancel on any of the available forms, it will do the same thing... Which is prompt for confirmation and then exit the application. The call from the forms is:
--
Call CancelButton()
--
The Module code is as follows:
-------------------------------------
Public Sub CancelButton()
'Prompts for confirmation of premature Cancel/Close/Exit of program by button and menu and closes on Yes.
Dim intExitResult As Short
intExitResult = MsgBox("Warning: This action will cancel your update and close this program." & vbCrLf & "The files on your hard drive will not be updated. Are you sure?", MsgBoxStyle.YesNo + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, "Exit the program?")
If intExitResult = MsgBoxResult.Yes Then
Call ErrorLog() 'Just logs the cancel in a file. Also in this module.
Call UniversalExit() 'Closes all forms and exits. Also in this module.
Else
'Just continue un-closed, leaving off where user was...
End If
End Sub
-------------------------------------
Any help would be much appreciated!! Thanks.
Dave
This one is killing me. This is a upgrade problem from VB6 to .NET. I have several forms calling this code located inside a module. It provides that if someone hits Cancel on any of the available forms, it will do the same thing... Which is prompt for confirmation and then exit the application. The call from the forms is:
--
Call CancelButton()
--
The Module code is as follows:
-------------------------------------
Public Sub CancelButton()
'Prompts for confirmation of premature Cancel/Close/Exit of program by button and menu and closes on Yes.
Dim intExitResult As Short
intExitResult = MsgBox("Warning: This action will cancel your update and close this program." & vbCrLf & "The files on your hard drive will not be updated. Are you sure?", MsgBoxStyle.YesNo + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2, "Exit the program?")
If intExitResult = MsgBoxResult.Yes Then
Call ErrorLog() 'Just logs the cancel in a file. Also in this module.
Call UniversalExit() 'Closes all forms and exits. Also in this module.
Else
'Just continue un-closed, leaving off where user was...
End If
End Sub
-------------------------------------
Any help would be much appreciated!! Thanks.
Dave