I am trying to write a macro (CustSpecificESDText) to copy specific text from one worksheet (Cust Specific Text) to a different worksheet (ESD Safety Log) based on a user selection from a list box on a third worksheet (Project Info). I will modify the code to add different ranges to copy based on the selection from the list box using If Then Else. But first I want to get the syntax correct. I keep getting a syntax error on the If statement
Sub CustSpecificESDText()
'
' CustSpecificESDText Macro
'
'
Dim ws As Worksheet
If ws.("Project Info").ListBox1.Value = "Sprint" Then
Sheets("Cust Specific Text").Select
Range("A2:E2").Select
Selection.Copy
Sheets("ESD Safety Log").Select
Range("A5:E5").Select
ActiveSheet.Paste
End If
End Sub
Bookmarks