All pastes #809886 Raw Edit

Zeug

public text v1 · immutable
·published 2007-12-09 10:10 UTC
rendered paste body
Sub pwahl()
 
Dim pname As String
Dim rdate As Date

 

pname = InputBox("Vollständiger Projektname?")
rdate = InputBox("MTA for which month? exact date")
Range("b21") = rdate
 

Windows("MTA_current_Projects_and_Comments.xls").Activate
Set ws = Worksheets("tabelle1")
Windows("Template_Project_Scorecard_ALNtest.xls").Activate
Set ws1 = Worksheets("data sheet")
 
suchwert = pname
suchwert2 = rdate
   
 
With ws.Range("a1:b999")
    Set c = .Find(suchwert, LookIn:=xlValues)
   
    If Not c Is Nothing Then
    
        ws1.Range("b44") = ws.Cells(c.Row + 1, c.Column + 3)
                    
        ElseIf c Is Nothing Then
            MsgBox ("kein Projekt gefunden, überprüfen Sie bitte den Projektnamen")
    End If
 
End With
 

End Sub