jwcolby
jwcolby at colbyconsulting.com
Thu Aug 11 12:16:44 CDT 2011
Try moving the string assignment to OnOpen. OnLoad is the point when eh form loads and is really before anything much is happening on the form. John W. Colby www.ColbyConsulting.com On 8/11/2011 12:32 PM, William Benson (VBACreations.Com) wrote: > > I am sending a nonempty string to openargs but when the form is closing I > call a subprocedure on the form which is closing -- and when that procedure > refers to OpenArgs, it is frequently null for reasons which I cannot > understand....? So I tried assigning the openargs to a module level string > variable instead, on _Load. I saw that the OpenArgs was null in that > assignment statement, throwing an error. So I checked the call stack, went > to the line of code which was opening the form, and saw that it was fine - > the strOpenArgs variable I was passing as the value for the OpenArgs > argument was a populated string. Anyone seen this? > > My workaround is to give up on OpenArgs and resort to a global string > variable. > > Thanks >