G
gavmer
Hi all,
The code below copies across a column from a sheet, problem is i
unhides the column. How do i amend so that it copies across the colum
but doesnt unhide it??
Private Sub ComboBox1_Change()
Dim myVal As String
Dim fRng As Range
Dim tRng As Range
Set fRng = Nothing
Set tRng = Worksheets("inclusions").Range("g1")
myVal = Worksheets("inclusions").ComboBox1.Value
Select Case myVal
Case Is = "202"
Set fRng = Worksheets("pricing").Range("e1")
Case Is = "204"
Set fRng = Worksheets("pricing").Range("f1")
Case Is = "205"
Set fRng = Worksheets("pricing").Range("g1")
Case Else
'do nothing???
End Select
If fRng Is Nothing Then
'not 704, 706, 708, 710...
'so do nothing
Else
fRng.EntireColumn.Copy _
Destination:=tRng
End If
End Sub
Cheers!
The code below copies across a column from a sheet, problem is i
unhides the column. How do i amend so that it copies across the colum
but doesnt unhide it??
Private Sub ComboBox1_Change()
Dim myVal As String
Dim fRng As Range
Dim tRng As Range
Set fRng = Nothing
Set tRng = Worksheets("inclusions").Range("g1")
myVal = Worksheets("inclusions").ComboBox1.Value
Select Case myVal
Case Is = "202"
Set fRng = Worksheets("pricing").Range("e1")
Case Is = "204"
Set fRng = Worksheets("pricing").Range("f1")
Case Is = "205"
Set fRng = Worksheets("pricing").Range("g1")
Case Else
'do nothing???
End Select
If fRng Is Nothing Then
'not 704, 706, 708, 710...
'so do nothing
Else
fRng.EntireColumn.Copy _
Destination:=tRng
End If
End Sub
Cheers!