Re: UF unter Win2000 poppt nich
21.08.2002 13:13:57
Jule
moin charlie,der Code in der ersten UF sieht so aus:
Private Sub form_load()
Dim xlapp As Object
Dim i As Integer
Dim y As Integer
y = 0
Set xlapp = Nothing
Me.Show
start = Timer
Do
zeit = Timer - start
DoEvents
Loop Until zeit >= 4.5
Me.Hide
On Error GoTo erstellen
Set xlapp = GetObject(, "Excel.application")
GoTo weiter
erstellen: Set xlapp = CreateObject("Excel.Application")
weiter: anz = xlapp.workbooks.Count
For i = 1 To anz
If xlapp.workbooks(i).Name <> "makro cycler_1.xls" Then
y = y + 1
End If
Next i
If y = anz Then
xlapp.workbooks.open "\\Media\Z\Makros\Cyclerauswertung\makro cycler_1.xls"
End If
xlapp.Visible = True
Set xlapp = Nothing
end sub
dann wird durch das modul "modmain" die erste UF geschlossen und die zweite UF geöffnet. Deren Code sieht dann so aus:
Private Sub cmbReadme_Click()
Dim wordapp As Object
On Error GoTo erstellen
Set wordapp = GetObject(, "Word.application")
GoTo weiter
erstellen: Set wordapp = CreateObject("Word.Application")
weiter: anz = wordapp.documents.Count
For i = 1 To anz
If wordapp.documents(i).Name <> "Cyclercontrol 1.doc" Then
y = y + 1
End If
Next i
If y = anz Then
wordapp.documents.open "\\Media\Z\Makros\Cyclerauswertung\Cyclercontrol 1.doc"
End If
wordapp.Visible = True
Set wordapp = Nothing
Unload Me
End Sub
Private Sub cmbabbruch_Click()
Unload Me
End Sub
tja, aber ich weiß halt nich warum das unter WinNT normal schön aufgeht, aber unter Win2000 nicht.
danke soweit, Jule :-)