Saturday, November 8, 2008

Mon Nov. 10: more menu fun, Part The Second

OK, now you've got a FileOpen thing going on, but it doesn't do very much. So let's remedy that: let's make it so it can find a file, and when you click on it, a Message box pops up that says the name of the file and where it is located. Add this code just BELOW where the other code went.

'this allows you to create a filename based on what you've chosen
Dim theFileName As String
theFileName = OpenFileDialog1.FileName
MsgBox(theFileName)

All this code does is make a String variable (useful for words and text and such) and then sets that variable equal to whatever is chosen in the OpenFile thingy. Then, it passes this to a MsgBox, which pops up to tell you what you've chosen

Make sure this works, then we will move on to the third and final installment

Cheers,
Mr. L

No comments: