Script uit VBA stoppen en starten?

Status
Niet open voor verdere reacties.
Prima!
Maar ik zou er dan dit van maken:

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    
    Dim naam As String
    Dim datum As String
        
    If Not Intersect(Target, Range("B4:H40")) Is Nothing Then
        Select Case Environ("UserName")
            
            Case "Moi", "Ikke"
            
                 Load UserForm1
                 naam = ActiveSheet.Cells(ActiveCell.Row, 1).Value
                 datum = Cells(3, ActiveCell.Column).Value
             
                 UserForm1.TextBoxOud.Text = CStr(ActiveCell.Value)
                 UserForm1.TextBoxNaam.Text = CStr(naam)
                 UserForm1.TextBoxDatum.Text = CStr(datum)
                 UserForm1.Show
        
     	End Select
    End If
End Sub
 
Laatst bewerkt:
en ik:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    If Not Intersect(Target, Range("B4:H40")) Is Nothing and instr("MoiIkke",environ("Username")) Then Userform1.show
end sub

Code:
Private Sub Userform_Initialize()
   TextBoxOud.Text = format(ActiveCell.Value)
   TextBoxNaam.Text = format(cells(activecell.row,1).value)
   TextBoxDatum.Text = format(Cells(3, ActiveCell.Column).Value)
End Sub
 
Laatst bewerkt:
Mooie :thumb:

Maar ik mis de w van show ;)
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan