V Nadeau
asked on
MessageBox not working in VB.net
Hi. I am trying to show a message box when the user has chosen a file that already exists and then exit the sub. I am getting a red line under the word 'show'. The error says "Overload failed because no accessable 'Show' accepts this number of arguments."
The following is my code:
Can someone please help with this, it seems like it should be a simple thing to do and I have tried numerous variations ... what and I doing wrong?
Thanks,
Valerie
The following is my code:
'Use filename chosen by user
strFileName = lblChosenFile.Text
strNewFileName = ForcastFileName(strFileName)
If System.IO.File.Exists(strNewFileName) Then
'The forcasted file exists
MessageBox.Show = ("File has already been forcasted.", "File Forcasted", MessageBoxButtons.OK)
Exit Sub
End If
Can someone please help with this, it seems like it should be a simple thing to do and I have tried numerous variations ... what and I doing wrong?
Thanks,
Valerie
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
-saige-