Ik heb een invulformulier gemaakt en wil dat op het moment het formulier geopend wordt de cursor geplaatst wordt in een het eerste veld, in dit geval het veld test. Op het moment dat het werkboek geopend is werkt het goed. Wanneer ik het werkboek open vanuit windows verkenner werkt het niet. Wie weet wat ik fout doe? dit is de code:
Dim invul, NIEUW
Private Sub Afsluiten_Click()
With Application
.DisplayAlerts = False
.Quit
End With
End Sub
Private Sub werkblad_Click()
invul = Me.test
'MsgBox ("de waarde van invul is: " & invul)
Range("c1").Value = test
Application.Goto Reference:="ww"
NIEUW = Range("E1").Value
'MsgBox "de waarde van nieuw is: " & NIEUW
txt = NIEUW
'MsgBox ("de waarde TXT is: " & txt)
Selection.Copy
Unload UserForm2
With Application
.DisplayAlerts = False
.Quit
End With
End Sub
Private Sub UserForm2_gotfous()
Me.test.SetFocus
End Sub
Private Sub UserForm_Initialize()
Application.WindowState = xlMinimized
End Sub
Dim invul, NIEUW
Private Sub Afsluiten_Click()
With Application
.DisplayAlerts = False
.Quit
End With
End Sub
Private Sub werkblad_Click()
invul = Me.test
'MsgBox ("de waarde van invul is: " & invul)
Range("c1").Value = test
Application.Goto Reference:="ww"
NIEUW = Range("E1").Value
'MsgBox "de waarde van nieuw is: " & NIEUW
txt = NIEUW
'MsgBox ("de waarde TXT is: " & txt)
Selection.Copy
Unload UserForm2
With Application
.DisplayAlerts = False
.Quit
End With
End Sub
Private Sub UserForm2_gotfous()
Me.test.SetFocus
End Sub
Private Sub UserForm_Initialize()
Application.WindowState = xlMinimized
End Sub