Visual Basics 2012 chapter 9 PC 10 I was working with the code that was presente
ID: 3822111 • Letter: V
Question
Visual Basics 2012 chapter 9 PC 10I was working with the code that was presented in Programming Challenge 10 and there is an issue with strFilename and ofdOpenFile as they are not defined. Looking for a solution to fix this. Visual Basics 2012 chapter 9 PC 10
I was working with the code that was presented in Programming Challenge 10 and there is an issue with strFilename and ofdOpenFile as they are not defined. Looking for a solution to fix this. Visual Basics 2012 chapter 9 PC 10
I was working with the code that was presented in Programming Challenge 10 and there is an issue with strFilename and ofdOpenFile as they are not defined. Looking for a solution to fix this.
Explanation / Answer
It would appear that you have declared ofdOpenFile as a io.streamreader which would be consistent with the errors messages.
---> ofdOpenFile needs to be of type System.Windows.Forms.OpenFileDialog.
Dim ofdOpenFile as New OpenFileDialog
If ofdOpenFile.ShowDialog() = Windows.Forms.DialogResult.OK Then
strDocumentName = ofdOpenFile.FileName
End If
I hope this will help, Thank!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.