Weeble
Board Regular
- Joined
- Nov 30, 2016
- Messages
- 95
- Office Version
- 365
So i've written a code to go thrue my drop down list and print every sheet.
I wan't to take it to the next level and do a For loop to do this for me.
Could anyone help me modify my code so that the loop goes thrue all the values but if it hits a "" space, stops.
I wan't to take it to the next level and do a For loop to do this for me.
Could anyone help me modify my code so that the loop goes thrue all the values but if it hits a "" space, stops.
Code:
Sub NastaButik() Dim v As Variant
With Sheets("Utskrift").Range("D2")
If .Value = "" Then
.Value = Sheets("Butiker").Range("D2").Value
Else
v = Application.Match(.Value, Sheets("Butiker").Range("D2:D75"), 0)
If IsNumeric(v) Then
.Value = Sheets("Butiker").Range("D2:D75").Cells(v + 1, 1).Value
If Sheets("Utskrift").Range("K2") > 0 Then
' ActiveSheet.PrintOut
MsgBox ("Printed")
End If
Else
.Value = ""
End If
End If
End With
End Sub