ich habe ein kleines Problem mit Textboxen.
Ich will eine Textbox erstellen in die ein Text eingetragen wird. Soweit hab ich das auch noch geschafft, allerdings will ich danach diesen Text gerne kopieren, in einem String speichern und im Firefox öffnen.
Probleme macht mir sowohl das kopieren des Texts in der Textbox und dann noch, dass es sich bei dem Text um einen Code handelt, so dass ich diesen irgendwie nicht in einem String speichern kann.
Mein Code sieht bisher wie folgt aus:
Dim tag, monat, jahr, startstunde, startminute, endestunde, endeminute, programm As String
Sheets("Tabelle1").Select
tag = Cells(2, 2).Value
monat = Cells(3, 2).Value
jahr = Cells(4, 2).Value
startstunde = Cells(7, 2).Value
startminute = Cells(8, 2).Value
endestunde = Cells(11, 2).Value
endeminute = Cells(12, 2).Value
endeminute = Cells(14, 2).Value
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 380.25, 135#, _
231.75, 167.25).Select
Selection.Characters.Text = _
"javascript: {sForm = document.formular.sStartdateDay;arrVals=arrStartdateDay;if(arrVals[sForm.value*1.0 +iStep]>=0){sForm.value = sForm.value*1.0 + iStep;};document.getElementById('sdivStartdateDay')."
Selection.Characters(201).Insert String:= _
"innerHTML = arrVals[sForm.value] ;aktiv=0;}function changeSelectionStartdateDay(iStep){if(!aktiv) aktiv = setTimeout(""changeSelectionStartdateDayS(""+iStep+"")"",1);}function changeSelectionStartdateM"
Selection.Characters(401).Insert String:= _
"onthS(iStep){sForm = document.formular.sStartdateMonth;arrVals=arrStartdateMonth;if(arrVals[sForm.value*1.0 +iStep]>=0){sForm.value = sForm.value*1.0 + iStep;};document.getElementById('sdivStartdateMo"
Selection.Characters(601).Insert String:= _
"nth').innerHTML = arrVals[sForm.value] ;aktiv=0;}function changeSelectionStartdateMonth(iStep){if(!aktiv) aktiv = setTimeout(""changeSelectionStartdateMonthS(""+iStep+"")"",1);}function changeSelection"
Selection.Characters(801).Insert String:= _
"StartdateYearS(iStep){sForm = document.formular.sStartdateYear;arrVals=arrStartdateYear;if(arrVals[sForm.value*1.0 +iStep]>=0){sForm.value = sForm.value*1.0 + iStep;};document.getElementById('sdivStar"
Selection.Characters(1001).Insert String:= _
"tdateYear').innerHTML = arrVals[sForm.value] ;aktiv=0;}function changeSelectionStartdateYear(iStep){if(!aktiv) aktiv = setTimeout(""changeSelectionStartdateYearS(""+iStep+"")"",1);}function changeSelec"
Selection.Characters(1201).Insert String:= _
"tionStartdateHourS(iStep){sForm = document.formular.sStartdateHour;arrVals=arrStartdateHour;if(arrVals[sForm.value*1.0 +iStep]>=0){sForm.value = sForm.value*1.0 + iStep;};document.getElementById('sdiv"
Selection.Characters(1401).Insert String:= _
"StartdateHour').innerHTML = arrVals[sForm.value] ;aktiv=0;}function changeSelectionStartdateHour(iStep){if(!aktiv) aktiv = setTimeout(""changeSelectionStartdateHourS(""+iStep+"")"",1);}function changeS"
Selection.Characters(1601).Insert String:= _
"electionStartdateMinuteS(iStep){sForm = document.formular.sStartdateMinute;arrVals=arrStartdateMinute;if(arrVals[sForm.value*1.0 +iStep]>=0){sForm.value = sForm.value*1.0 + iStep;};document.getElement"
Selection.Characters(1801).Insert String:= _
"ById('sdivStartdateMinute').innerHTML = arrVals[sForm.value] ;aktiv=0;}function changeSelectionEnddateMinute(iStep){if(!aktiv) aktiv = setTimeout(""changeSelectionEnddateMinuteS(""+iStep+"")"",1);}func"
Selection.Characters(2001).Insert String:= _
"tion changeSelectionEnddateHourS(iStep){sForm = document.formular.sEnddateHour;arrVals=arrEnddateHour;if(arrVals[sForm.value*1.0 +iStep]>=0){sForm.value = sForm.value*1.0 + iStep;};document.getElement"
Selection.Characters(2201).Insert String:= _
"ById('sdivEnddateHour').innerHTML = arrVals[sForm.value] ;aktiv=0;}function changeSelectionEnddateHour(iStep){if(!aktiv) aktiv = setTimeout(""changeSelectionEnddateHourS(""+iStep+"")"",1);}function cha"
Selection.Characters(2401).Insert String:= _
"ngeSelectionEnddateMinuteS(iStep){sForm = document.formular.sEnddateMinute;arrVals=arrEnddateMinute;if(arrVals[sForm.value*1.0 +iStep]>=0){sForm.value = sForm.value*1.0 + iStep;};document.getElementBy"
Selection.Characters(2601).Insert String:= _
"Id('sdivEnddateMinute').innerHTML = arrVals[sForm.value] ;aktiv=0;}function changeSelectionStartdateMinute(iStep){if(!aktiv) aktiv = setTimeout(""changeSelectionStartdateMinuteS(""+iStep+"")"",1);}func"
Selection.Characters(2801).Insert String:= _
"tion changeSelectionTVStationS(iStep){sForm = document.formular.sTVStationf1CC3633C579A90CFDD895E64021E2163;arrVals=arrTVStation;if(arrVals[sForm.value*1.0 +iStep]){sForm.value = sForm.value*1.0 + iSt"
Selection.Characters(3001).Insert String:= _
"ep;};document.getElementById('sdivTVStation').innerHTML = arrVals[sForm.value] ;aktiv=0;}function changeSelectionTVStation(iStep){if(!aktiv) aktiv = setTimeout(""changeSelectionTVStationS(""+iStep+"")"",1"
Selection.Characters(3201).Insert String:= _
"000);}function ResetVals(){document.formular.sStartdateDay.value=" & tag & " ;document.formular.sStartdateMonth.value=" & monat & ";document.formular.sStartdateYear.value=" & jahr & ";document.formular.sStartdateHour.value=" & startstunde & ";docu"
Selection.Characters(3401).Insert String:= _
"ment.formular.sStartdateMinute.value=" & startminute & ";document.formular.sEnddateHour.value=" & endestunde & ";document.formular.sEnddateMinute.value=" & endeminute & ";document.formular.sTVStationf1CC3633C579A90CFDD895E64021E2163.value=" & programm & ";changeSele"
Selection.Characters(3601).Insert String:= _
"ctionStartdateDayS(0);changeSelectionStartdateMonthS(0);changeSelectionStartdateHourS(0);changeSelectionStartdateMinuteS(0);changeSelectionStartdateYearS(0);changeSelectionEnddateHourS(0);changeSelect"
Selection.Characters(3801).Insert String:= _
"ionEnddateMinuteS(0);changeSelectionTVStationS(0);aktiv=0;}"
Dim name As String
name = TextBox.Value 'mir ist bewusst dass es so nicht geht
Shell "C:\Firefox.EXE " & name,
End sub