Forum Discussion

sf49ers19238597's avatar
sf49ers19238597
Iron Contributor
Dec 14, 2020

I have a friend that need help with vab code

need help with part  of vba code

 

 

If Me.cmbWeek.ListIndex > -1 Then
    Set Ws = Worksheets(Me.cmbWeek.Value)
         Else: MsgBox "INCORRECT INPUT." & vbNewLine & "Use Dropdown For Listed Weeks.", vbCritical, "INPUT ERROR"
         cmbWeek.SelStart = 0
         cmbWeek.SelLength = cmbWeek.TextLength
         Exit Sub
    End If

 

 

I not sure what do to change the code?

 

all the rest code is good in that selection

 

Thanks You

14 Replies

Resources