jameshunt83
Board Regular
- Joined
- Oct 2, 2010
- Messages
- 149
Hi, I'm not very good with VBA really, but learning! Have written the below code, however its very slow! I'm sure there must be a better way of doing this
Code:
Sub basic_quote_rows()
Dim i As Long
Dim j As Long
i = 6
j = 19
Do While j < 95 And j > 19
If Sheets("material").Rows(i).Hidden = True Then Sheets("quotebasic").Rows(j).Hidden = True Else Sheets("quotebasic").Rows(j).Hidden = False
i = i + 1
j = j + 1
Loop
Dim x As Long
Dim y As Long
i = 92
j = 102
Do While j < 126 And j > 101
If Sheets("material").Rows(i).Hidden = True Then Sheets("quotebasic").Rows(j).Hidden = True Else Sheets("quotebasic").Rows(j).Hidden = False
i = i + 1
j = j + 1
Loop
End Sub