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.

Problem mit IsMissing unter VBA

Empfohlene Antworten

Veröffentlicht


Public Sub test(a As String, Optional ByRef A1 As String, Optional ByRef A2 As String, Optional ByRef A3 As String, Optional ByRef A4 As String)

 On Error GoTo testerror

 If Not IsMissing(A1) Then MsgBox "A1:=" & A1 Else MsgBox "A1 FAILED."

 If Not IsMissing(A2) Then MsgBox "A2:=" & A2 Else MsgBox "A2 FAILED."

 If Not IsMissing(A3) Then MsgBox "A3:=" & A3 Else MsgBox "A3 FAILED."

 If Not IsMissing(A4) Then MsgBox "A4:=" & a4 Else MsgBox "A4 FAILED."

 Exit Sub

testerror:

 MsgBox Err.number

End Sub



Private Sub CommandButton2_Click()

 test "abc", "def", "ghi", "jkl"

End Sub

Wenn ich test aufrufe, und ein Argument weglasse, bspw. A4, dann müßte ja "A4 FAILED." angezeigt werden. Passiert aber nicht.

Wo habe ich hier den Fehler?

äh.. fehlen bei dir nicht die "End If" ´s bei deinen If-Abfragen???

Nee, die fehlen nicht, wenn man alles in eine Zeile schreibt. Ich glaube, das hier beschreibt dein Problem.

Danke.

Jetzt muß ich nur noch einen Großteil meiner anderen Variablen ändern.

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.