To see if it's a scope issue, declare your variable as public, not local. Mike Copeland
Sent from Proton Mail Android -------- Original Message -------- On 6/17/24 6:33 PM, Joe Yoder <j...@wheypower.com> wrote: > Thanks Eric for the input. I think I have correctly made the changes you > suggested but the code fails with "Unknown member oComboBox" > Here is the code as I have it now: > > * Procedure to add a ComboBox to the form > PROCEDURE AddComboBoxToForm(toForm, nTop, nLeft, cname) > LOCAL oComboBox > oComboBox = CREATEOBJECT("ComboBox") > oComboBox.AddItem("Item 1") > oComboBox.AddItem("Item 2") > toForm.oComboBox.Top = nTop > toForm.oComboBox.Left = nLeft > toForm.oComboBox.Visible = .T. > toForm.AddObject(cname, "oComboBox") > > ENDPROC > For some reason I need to go to the archive to get any responses to my post > so this will appear as a new thread. > > Thanks again, > Joe > > > --- StripMime Report -- processed MIME parts --- > multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/VxeiO_XcVwVNL7dlRCnjmjm0eS0dkyYqGhUBGgx9lC-nfV8uSxxNZhEAxfRGEPZ_DBrAtBsWUpt4CobBMwDpoovUgadTJzAFOHM0PQMUqEU=@ggisoft.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.