Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Objekt in VBA als Parameter übergeben

Empfohlene Antworten

Veröffentlicht

Hi@all!

ich hätte da gern mal ein problem...

möchte eín objekt an eine andere objektmethode übergeben.

Dim Hans As New clsPerson

(clsPerson besitzt eine Methode "goInto(ByRef clsBarExt As clsBar)", die vorläufig zum testen garnichts tut)

Dim Disco As New clsBar

Hans.goInto (Disco)

Resultat: Fehler 438. weiß jemand, woran das liegen könnte?

vielen dank für eure mühe

gruß

mario

hab die lösung, vielleicht interessiert es ja jemanden...

setzt man ein Call vor den Funktionsaufruf, funzt es, fragt mich nicht warum. normalerweise braucht man Call ja, um zu sagen, daß man mit dem rückgabewert einer function nix anfangen will, wenn ich das richtig verstanden habe. naja wenn man ein objekt übergeben will, scheinbar auch. oh mann vba ist so ein schrott...

Hallo,

nur zur Info:

Wenn Du keinen Rückgabewert hast, nennt man das ganze eine Procedure. Diese musst Du mit Call DeineProcedure() aufrufen.

Eine Function hat immer einen Rückgabewert. Diese muss man dann mit returnValue = DeineFunction().

Gruß Meenzer

lass einfach die () weg und schreib den Parameter so hin.

Hans.gointo Disko

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.