All, I am trying to open a file on a form from a button. The file name is held in the field FileLoc.
I have this code that worked once, then has been giving me the Object Variable Not Set. I know that this means I have not set something, but for the life of me I can’t see it.
Dim db As NotesDatabase
Dim result As Integer
Dim hi As Variant
Dim uidoc As NotesDocument
Set hi = uidoc.FieldGetText("FileLoc")
result = Shell("hi", 1)
Thanks for your responses. I will try them today. As for the dubugger, I had turned it on and tried the code a half dozen times, only to get a pop up box with “Object Variable not set” and nothing apparently happening with the code. I had expected to step through the code so it could point out the errors of my ways.
It was pointing out the errors of your ways. The line that threw that error had an instance of something that was not initialized. If you step through it and it throws the error on something like:
set strVariable = NotesDocument.Filename(0)
Then it could be that the NotesDocument is not initialized to anything. Look at the Variable tab and see which variables have nothing to the right of them.
As the variables get initialized the variable contents is displayed to the right.