Abfrage per Input-Box
18.03.2004 10:50:09
Ingo Siemon
Ich nutze mit Excel XP folgenden VBA-Code,
um Date´n aus einer Excel-Tabelle in eine Text-Datei zu schreiben:
Print #iFile, "<table><tr><td><img src=""../blind.gif"" height=1 alt=""""></td></tr></table>"
Print #iFile, "<table class=""weiss"" border=0 cellspacing=0 cellpadding=0 width=510>"
Print #iFile, "<tr><td>"
Print #iFile, " <table border=0 cellspacing=1 cellpadding=2 width=""100%"">"
Print #iFile, " <tr>"
Print #iFile, " <td class=""dunkel"" width=317><p class=""mitte""><a href=""XXX.shtml"" onFocus=""this.blur()""><img src=""pfeil-l.gif"" alt=""vorheriges Modell"" title=""vorheriges Modell"" border=0></a><img src=""../blind.gif"" width=30 height=1 alt=""""><a class=""under"" href=""../Listen/" & Cells(iRow, 33) & ".htm#" & Cells(iRow, 34) & """ onFocus=""this.blur()"">zurück zur Übersicht</a><img src=""../blind.gif"" width=30 height=1 alt=""""><a href=""XXX.shtml"" onFocus=""this.blur()""><img src=""pfeil-r.gif"" alt=""nächstes Modell"" title=""nächstes Modell"" border=0></a></p></td>"
Print #iFile, " <td class=""dunkel"" width=175><p class=""rechts""><a class=""under"" href=""#"" onclick=""dazu('" & Cells(iRow, 3) & "',' " & Cells(iRow, 8) & ", (" & Cells(iRow, 2) & ")','" & Cells(iRow, 6) & "','" & Cells(iRow, 22) & "-" & Cells(iRow, 23) & ".jpg" & "');return false"" onFocus=""this.blur()"">in den Warenkorb</a></p></td>"
Print #iFile, " </tr>"
Print #iFile, " </table>"
Print #iFile, "</td></tr>"
Print #iFile, "</table>"
Code eingefügt mit Syntaxhighlighter 2.5
Im obigen VBA-Code sind ja 2 Stellen wo ein "XXX" steht.
Nun möchte ich es gerne so haben, dass, wenn ich den VBA-Code (bzw. das entsprechenden Makro) ausführe,
ich per Input-Box gefragt werde, was denn anstelle des "XXX" stehen soll.
Und das, was ich dann in die Input-Box eingebe, soll in der fertigen Text-Datei
dann genau anstelle des "XXX" stehen.
Ist sowas machbar ?
Über Hilfe würde ich mich sehr freuen, da ich selber leider mit VBA nicht so gut Bes´cheid weiss.
Gruß aus Münster
Ingo