Anzeige
Archiv - Navigation
1264to1268
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

UserForm statt MessageBox (2)

UserForm statt MessageBox (2)
Marc
Hallo nochmal,
ich verwende momentan folgenden Code zur Erstellung einer MessageBox.
Kann mir jemand sagen, was ich hier ändern muss, damit der Text statt in einer MessageBox in einer UserForm (UserForm2, TextBox2) erscheint ?
Sub About_Msg()
Dim strMldg As String
strMldg = strMldg & "TEXT1" & vbLf
strMldg = strMldg & "" & vbLf
strMldg = strMldg & "TEXT2" & Worksheets(2).Range("I3") & vbLf
strMldg = strMldg & "" & vbLf
strMldg = strMldg & "TEXT3" & vbLf
strMldg = strMldg & "TEXT3a" & Format(Worksheets(2).Range("I7"), "#,##0") & vbLf
strMldg = strMldg & "TEXT3b" & Format(Worksheets(2).Range("I8"), "#,##0") & vbLf
strMldg = strMldg & "TEXT3c" & Format(Worksheets(2).Range("I9"), "#,##0") & vbLf
strMldg = strMldg & "TEXT3d" & Format(Worksheets(2).Range("I10"), "#,##0") & vbLf
strMldg = strMldg & "" & vbLf
strMldg = strMldg & "TEXT4" & vbLf
strMldg = strMldg & " - TEXT5" & vbLf
strMldg = strMldg & " - TEXT6" & vbLf
strMldg = strMldg & "" & vbLf
strMldg = strMldg & "TEXT7" & Worksheets(2).Range("I4") & " TEXT8"
MsgBox strMldg, vbOKOnly, "About"
End Sub
VG und vielen Dank Euch im Voraus für jeden Tipp,
Marc

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Benutzer
Anzeige
AW: UserForm statt MessageBox (2)
10.06.2012 18:54:31
Josef

Hallo Marc,
Sub About_Msg()
  Dim strMldg As String
  
  strMldg = strMldg & "TEXT1" & vbLf
  strMldg = strMldg & "" & vbLf
  strMldg = strMldg & "TEXT2" & Worksheets(2).Range("I3") & vbLf
  strMldg = strMldg & "" & vbLf
  strMldg = strMldg & "TEXT3" & vbLf
  strMldg = strMldg & "TEXT3a" & Format(Worksheets(2).Range("I7"), "#,##0") & vbLf
  strMldg = strMldg & "TEXT3b" & Format(Worksheets(2).Range("I8"), "#,##0") & vbLf
  strMldg = strMldg & "TEXT3c" & Format(Worksheets(2).Range("I9"), "#,##0") & vbLf
  strMldg = strMldg & "TEXT3d" & Format(Worksheets(2).Range("I10"), "#,##0") & vbLf
  strMldg = strMldg & "" & vbLf
  strMldg = strMldg & "TEXT4" & vbLf
  strMldg = strMldg & " - TEXT5" & vbLf
  strMldg = strMldg & " - TEXT6" & vbLf
  strMldg = strMldg & "" & vbLf
  strMldg = strMldg & "TEXT7" & Worksheets(2).Range("I4") & " TEXT8"
  
  With UserForm2
    .TextBox2 = strMldg
    .Show
  End With
  
End Sub



« Gruß Sepp »

Anzeige
AW: UserForm statt MessageBox (2)
10.06.2012 19:08:45
Marc
Hallo Sepp,
vielen vielen Dank für die schnelle Hilfe - klappt super ! :-)
VG und einen schönen Abend noch,
Marc

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige