tbablue
Active Member
- Joined
- Apr 29, 2007
- Messages
- 488
- Office Version
- 365
- Platform
- Windows
The rudimentary code below passes a value to the macro PRINTz_ONE, runs PRINTz_ONE then introduces the next value, .......... and so on.
Sub PRINTz_GRP()
On Error Resume Next
With Range("SITEx_PICKER")
.Value = "ROLLED-UP": PRINTz_ONE
.Value = "NYC": PRINTz_ONE
.Value = "MUNICH": PRINTz_ONE
.Value = "WA": PRINTz_ONE
End With
End Sub
This works fine - but it isn't very flexible. I need to specify each site in the code when I want that value passed to PRINTz_ONE - and remove it when I don't.
I need a loop that will reference a lookup table within the workbook ('PPS'!D3:E12), where D contains a list of sites (NYC, PARIS, LONDON, etc) and column E contains the values YES or NO. I need the loop to only run PRINTz_ONE for the sites that have the value YES ascribed.
Can any one help me? Any assistance welcomed.
Sub PRINTz_GRP()
On Error Resume Next
With Range("SITEx_PICKER")
.Value = "ROLLED-UP": PRINTz_ONE
.Value = "NYC": PRINTz_ONE
.Value = "MUNICH": PRINTz_ONE
.Value = "WA": PRINTz_ONE
End With
End Sub
This works fine - but it isn't very flexible. I need to specify each site in the code when I want that value passed to PRINTz_ONE - and remove it when I don't.
I need a loop that will reference a lookup table within the workbook ('PPS'!D3:E12), where D contains a list of sites (NYC, PARIS, LONDON, etc) and column E contains the values YES or NO. I need the loop to only run PRINTz_ONE for the sites that have the value YES ascribed.
Can any one help me? Any assistance welcomed.