self does not mean anything in a modual method

i am getting an error message within a shared method when i try to access any control within the Main window
Ex: MainWin.Browser.Text
produces this ERROR Message.
“self” does not mean anything in a modual method"

prior writing multiple apps, i never had an issue accessing controls from methods and / or other windows.
In this current app i am working with, many of the controls were cut and pasted from other apps.

SELF and ME are only valid within the scope of an 'object" such as a WIndow, Class or control

Otherwise you must reference the object by its explict “name”, and even then the object needs to be in scope

The name of the main window is “MainWin”
I am explicitly calling out the Main Windows name when i access it’s controls.
ex: MainWin.Control.text = “”
Before it has worked with no issues

further I can access other control in another window in the same app with no issue
EX: OtherWindowName.Control.text = “”

Then I don’t understand your issue…

ok,
I duplicated my app.
then i deleted the MainWin … and recreated the MainWin from scratch with no copy and pasting of controls.
and now it works… So it must be that my MainWin was somehow corrupted …

[quote=348753:@David Cullins]i am getting an error message within a shared method when i try to access any control within the Main window
Ex: MainWin.Browser.Text
produces this ERROR Message.
“self” does not mean anything in a modual method"

prior writing multiple apps, i never had an issue accessing controls from methods and / or other windows.
In this current app i am working with, many of the controls were cut and pasted from other apps.[/quote]
That’s because of you’re using self inside shared method. Change Self with MainWin will fix the issue.

ohhhh wait folks,
In the MainWin i just discovered that i had the “Implicit Instance” Set to OFF
once i set it to ON, the problem goes away.

But now i have another issue. When i run my App the window is Invisible. even though i specified Visible=ON…

“”" i was never using “self” i was always calling out the name of the window as “MainWin”

Check your default window in App.DefaultWindow

That’s weird.

the main window is the default window…

Probably somewhere in your startup code, you add MainWindow.Hide(), MainWindow.Minimize(), Me.Hide(), Me.Minimize(), Self.Hide(), or Self.Minimize().